Jump to content

[SOLVED] Option form isn't sending to mysql


elis

Recommended Posts

Here's a snippet of my coding:

[code]

$position= $_POST['position'];

$appc="SELECT * FROM tssettings";
$query=mysql_query($appc);
$res=mysql_fetch_array($query);


<select name=\"position\"><OPTION SELECTED name=\"position\" VALUE=\"Positions

Available\">Positions Available</option>";

if(!$res[position_1_t]=="")
{$command.="<option name=\"position\" value=\"$res[position_2_t]\">$res[position_1_t]</option>";
}else{$command.="";}

if(!$res[position_2_t]=="")
{$command.="<option name=\"position\" value=\"$res[position_2_t]\">$res[position_2_t]</option>";
}else{$command.="";}

if(!$res[position_3_t]=="")
{$command.="<option name=\"position\" value=\"$res[position_3_t]\">$res[position_3_t]</option>";
}else{command.="";}

if(!$res[position_4_t]=="")
{$command.="<option name=\"position\" value=\"$res[position_4_t]\">$res[position_4_t]</option>";
}else{$command.="";}

if(!$res[position_5_t]=="")
{$command.="<option name=\"position\" value=\"$res[position_5_t]\">$res[position_5_t]</option>";
}else{$command.="";}

$output.="</select>";[/code]

The problem is on submit, the values aren't being sent into the database. I know the values are being read correctly because "$res[name]" in the dropdown shows up, its just that it's not being submitted in.
I think it may have something to do with the name of the form, I'm not certain though, a second pair of eyes would be extremely appreciated.
Link to comment
https://forums.phpfreaks.com/topic/36441-solved-option-form-isnt-sending-to-mysql/
Share on other sites

I assure you, there is an insert query...

I did forget to post it.


[quote]$send = "INSERT INTO appl_user (tid,pid,username,name,date,loc,posistion,exp,sam_w,sam_s,coms,email) VALUES ('','$uidded','$username','$name','$date','$loc','$posistion','$exp','$samw','$sams','$coms','$email')";
$sent = mysql_query($send) or die("Query setup failed".mysql_error());

[/quote]


Nor is this "solved". I'd appreciate being asked whether it is instead of assumptions being made in the future.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.