Jump to content

[SOLVED] POST from a drop down box not working, help me please... =[


jigsawsoul

Recommended Posts

$result = "SELECT * FROM wbl_craftsperson ORDER BY name ASC";
$result = mysql_query( $result ) or die( mysql_error() );

$craftsperson1 .= '<select name="craftsperson1" id="craftsperson1">'; 

while( $row  = mysql_fetch_assoc( $result ) )
$craftsperson1 .= '<option value="'.$row['$craftsperson_id'].'">'.$row['name'].'</option>'; 

$craftsperson1 .= '</select>';

 

Then in the html

 

<div id="form_accountinfo" class="mb">
    			
					<h1>Send Response</h1>

					<p class="grey">You are currently logged in as <em><?=$username?></em>.</p>

					<form action="respond2.php?id=<?=$commissionid?>" method="post">

						<fieldset>

							<label for="subject"><b>Description</b></label>
							<?=$current_description?>

							<br />

							<label for="subject"><b>Comments</b></label>
							<?=$current_comments?>

							<br />

							<label for="craftsperson1"><b>Crafts Person 1</b></label>
							<?=$craftsperson1?>

							<label for="quote1"><b>Quote 1</b></label>
							<input id="quote1" name="quote1" size="30" type="text" value="£" /><br />

							<label for="craftsperson2"><b>Crafts Person 2</b></label>
							<?=$craftsperson2?>

							<label for="quote2"><b>Quote 2</b></label>
							<input id="quote2" name="quote2" size="30" type="text" value="£" /><br />

							<input type="submit" value="Send Response" class="primary" />

						</fieldset>

					</form>

 

Page 2

 

$craftsperson1 = $_POST['craftsperson1'];

echo $craftsperson1;

exit;

 

But i get nothing i have checked all the names on my pages and database but everything to be seems fine.. ?

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.