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
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.