Jump to content

edwardda

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

edwardda's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can someone please help > im new to php and trying to complete code for a tour price calculator and keep getting the following error message Undefined index: error in C:\wamp\www\tourprice.php on line 32 line 32 reads 32 if ($_GET['error'] == "notnumeric"){ 33 echo "<p class=\"error\">*** Error! One or more fields was left blank or contained a non-numeric character.</p>"; 34 } ?> any help would be greatly appreciated
  2. in the result page i have <p>hi <?php echo $_COOKIE['firstname']; ?> <?php echo $_COOKIE['lastname']; ?></p>
  3. Hello all wondering if someone can help > I’m fairly new to php and while work on a training I ran into the following problem>> in trying to write code to capture the values 'first name' and 'last name' in cookies the code im using is <?php setcookie('firstName', $_GET['firstName'], time() + (60*60*24)); setcookie('lastName', $_GET['lastName'], time() + (60*60*24)); ?> Can any tell me what I’m doing wrong so confused
  4. I’m new to Dreamweaver CS4 and I’m working though a training source book, I’m currently trying to pass data between pages I have created the first name page and it displays the error message “ Notice: Undefined index: firstName in C:\wamp\www\test_form_processor.php on line 9 Call Stack # Time Memory Function Location 1 0.0012 667264 {main}( ) ..\test_form_processor.php:0 Can some tell me what I’m doing wrong? The code for the test_form_processor.php is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>newland</title> </head> <body> <p>thank you,<?php echo $_POST['firstName']; ?>,for filling out my form </p> </body> </html The code test_form.php is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>newland</title> </head> <body> <form id="frm_name" name="frm_name" method="post" action="test_form_processor.php"> <label for="textfield">First Name</label> <input type="text" name="textfield" id="textfield" /> <input type="submit" name="button" id="button" value="Submit" /> </form> </body> </html>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>newland</title> </head> <body> <p>thank you,<?php echo $_POST['firstName']; ?>,for filling out my form </p> </body> </html
×
×
  • 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.