Jump to content

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

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.