Jump to content

[SOLVED] Can't Pass A Form Variable


monkeybidz

Recommended Posts

I have a form page that is mixed php and html. The form page is .php. All form variables are passed OK, except for one named service_type. I am showing the form here with just that variable.

 

<form name="form1" method="POST" action="quote_result.php?">

<select name="service _type" id="service _type">

<option value="1">Standard</option>

<option value="2">Rush</option>

</select>

<input type="submit" name="Submit" value="Submit">

</form>

 

I tried using the following on the result page:

 

global $service_type;

 

and

 

$service_type = $_POST['service_type'];

 

I used this in the results page to display the variable:

 

<?=$service_type?>

 

and

 

<? echo $service_type;?>

 

All other variables are passed OK. Just can't get this one.

Link to comment
https://forums.phpfreaks.com/topic/70815-solved-cant-pass-a-form-variable/
Share on other sites

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.