I have a quick question.
What method would be best to use to retreive information from a form that has dynamic textfields [you can add more and more textfields. The names would be textfield0,textfield1,textfield2,etc.
I'm not asking for the code, just asking what would be the best way to retreive all the textfields + the count. I was thinking a foreach, but then i couldn't think of a way to retrieve them all..unless i use [] in the textfield name param..
Thanks in advance
here is my code for the function thus far:
function cars_addspecs() {
$info = auth_member();
$car_id = $GLOBALS["Get"]->val("car_id");
if(!$car_id){
load_page(URL."/p/cars/s/manage");
}//if
$sql_query = "SELECT count(*) FROM cars WHERE car_id='".$car_id."' AND mem_id='".$info["mem_id"]."'";
$exist = $GLOBALS["DB2"]->single($sql_query);
if($exist) {
build_error(100141,"cars","manage");
}//if
$sql_query = "INSERT INTO cars_specifications (engine_mods,suspension_mods,electronic_mods,wheel_mods,chasis_mods,interior_mods,brief_description,402m,0_100kmh,0_300kmh,0_1000m,car_value,modify_budget,sponsor_company,sponsor_url,':car_id:') VALUES (
':engine_mods:',':suspension_mods:',':electronic_mods:',':wheel_mods:',':chasis_mods:',':interior_mods:',':brief_description:',':402m:',':0_100kmh:',':0_300kmh:',':0_1000m:',':car_value:',':modify_budget:',':sponsor_company:',':sponsor_url:',':car_id:')";
as you can see i'm stuck at the point of making the values of dynamic "sponsor_company" and "sponsor URL"
Thanks again

Start a new topic
Add Reply




MultiQuote


| 


