Jump to content

jagz

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jagz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you replay....can i ask you one more thing...i have multiple value in html form where user can select if they want to...how can i get those value in php if user has selected.? <select class="select" id="extras" name="options[]" multiple="multiple" size="6"> <optgroup label="Entertainment"> <option value="1">6 disc DVD changer</option> <option value="2">TV function</option> <option value="3">DAB digital radio</option> <option value="4">Loudspeaker system - professional </option> <option value="5" title="Multimedia navigation system. Uses advanced audio technology">Multimedia navigation system</option> </optgroup> <optgroup label="Communication"> <option value="6">Universal remote control</option> <option value="7">Voice control</option> <option value="8">Navigation system</option> <option value="9">Head-up display</option> </optgroup> <optgroup label="Safety and Security"> <option value="10">Adaptive headlights</option> <option value="11">Night vision with pedestrian recognition</option> <option value="12">Run-flat tyres</option> </optgroup> </select> above is my html code
  2. Hi there, im trying to get value from form to PHP but its not working. <?php if (isset($_POST['cartype'])==0) { echo("Please select car type."); } else if (isset($_POST['carcolour'])==0) { echo("Please select car colour."); } else if (isset($_POST['carenginesize'])==0) { echo("Please select car engine size."); } else if (isset($_POST['terms'])==0) { echo("Please agree to site terms and conditions before submitting your order.<br/> Press the back button in your browser to try again."); } else{ $name=$_POST['firstname']; $lastname=$_POST['lastname']; $email=$_POST['emailaddress']; $phone=$_POST['phone']; $ctype=$_POST['cartype']; $colour=$_POST['carcolour']; $enginesize=$_POST['carenginesize']; $options=$_POST['options']; echo "Dear,"."$name"."$lastname"; echo "<br/>Thank you for your order"; echo "<br/>You're contact details are:-"; echo "Phone : "."$phone"; echo "email: "."$email"; echo "<br/>You have selected the following car:"; echo "<br/>Car type:"."$ctype"; echo "<br/>Colour:"."$colour"; echo "<br/>Engine size:"."$enginesize"; echo "<br/>Options:<br/>"; $count=count($options); for($i=0;$i<$count;$i++) { echo $options[$i]."<br/>"; } $optn=array("6 disc DVD changer", "TV function", "DAB digital radio", "Loudspeaker system - professional ", "Multimedia navigation system", "Universal remote control", "Voice control", "Navigation system", "Head-up display", "Adaptive headlights", "Night vision with pedestrian recognition", "Run-flat tyres"); foreach($options as $optn) { echo "NEw option ".$optn."<br/>"; } } ?>
×
×
  • 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.