Jump to content

zeusthegreat

Member
  • Posts

    86
  • Joined

  • Last visited

Posts posted by zeusthegreat

  1. so what you are saying is i only have to change

     

     

    killerphp.com

     

    to

     

    //KILLERPHP.COM

     

    and it will work because it is not part of the code then.

     

    shll try it tommorow now as it is rest time now but thanks

  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">'>http://www.w3.org/1999/xhtml">'>http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Untitled Document</title>

    <style type="text/css">

    body {

    background-color: #FFC;

    }

    </style>

    </head>

     

    <body>

    <br>

    <form method="post" action="form_response.php">

     

    <div class="form_element_div">

    First Name: <br> <input name="name_first" type="text" size="50"

    maxlength="200"/>

    </div>

    <div class="form_element_div">

    Email: <br><input name="email" type="text" size="50"

    maxlength="200" />

    </div>

    <div class="form_element_div">

    Favorite colour:

    <INPUT type=radio value="red" name="colour"/>

    red

    <INPUT type=radio CHECKED value="yellow" name="colour"/>

    yellow

    <INPUT type=radio value="blue" name="colour"/>

    blue

     

    </div>

    <br>

    <div class="form_element_div">

    Favorite Website:

    <select name="favorite-website">

    <Option value="" selected>Please Select</Option>

    <Option value="www.killerstes.com">killersites.com </Option>

    <Option value="www.killerphp.com">killerphp.com </Option>

    <Option value="www.google.com">google.com </Option>

     

    </select>

    </div>

    <br>

     

    <div class="form_element_div">

    Comments: <br>

    <textarea name="comments" cols="50" rows="2" id="description"

    ></textarea>

    </div>

    <br>

    <div class="form_element_div">

    <input type="submit" name="submit_button" value="Submit Request

    >>" class="submit" />

    </div>

    </form>

    </div>

     

    <div style="margin-top:25px;">

    <a href="form_query.php?email=videos&name_first=stefan"

    >Query String</a>

    </div>

    </body>

    </html>

     

     

     

     

    copied this pasted it like you said

     

     

    named the file afterwards talos_form.php

     

     

    <!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>Untitled Document</title>

    <style type="text/css">

    body {

    background-color: #FFC;

    }

    </style>

    </head>

     

    <body>

    <div id="topbar"></div>

    <div id="navigation" class="container"></div>

    <div id="centerDoc" class="container">

    <div style="margin-top:25px; margin-bottom:20px; "> </div>

    <div>

     

    <?php

    if(isset($_POST['submit_button']))

    {

    // FORM PROCESSING CODE - USING 'SUPER GLOBALS' -

     

    KILLERPHP.COM

     

    $first_name = $_POST['name_first'];

    $email = $_POST['email'];

    $colour = $_POST['colour'];

    $website = $_POST['favorite-website'];

    $comments = $_POST['comments'];

     

    print "<p>First Name: $first_name with an email of: $email and Favorite

    Colour: $colour and Favorite Website: $website and Comments:

    $comments</p>";

    }

    ?>

     

    </div>

     

    </body>

    </html>

     

     

     

    then copied this and renamed the file

     

    form_response .php

     

     

     

    <!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>Untitled Document</title>

    <style type="text/css">

    body {

    background-color: #FFC;

    }

    </style>

    </head>

     

    <body>

    <div id="topbar"></div>

    <div id="navigation" class="container"></div>

    <div id="centerDoc" class="container">

    <div style="margin-top:25px; margin-bottom:20px; "> </div>

     

    <div>

    <?php

     

    $first_name = $_GET['name_first'];

    $email = $_GET['email'];

     

    print "<p>First Name: $first_name with an email of: $email</p>";

     

    ?>

     

    </div>

     

    </body>

    </html>

     

    the copied this and named it form_query.php

     

    and as has happened all the way through the talos_form page loads

     

    the submit button comes up with

     

    Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\form_response.php on line 28

     

    and the third page when clicked on the query link works fine

     

     

    I have been using your code ever sinc e you posted it and still no joy!!!!

     

     

    I am using wamp by the way if that has any significance

  3. I have done this both ways downloaded code and applied your names to the particular pages and applied my names to the pages and i get the same error!

     

    I am wondering if there is something in the php settings panel that i need to change as i am not thick by any means and usually when i follow a training lesson i plough through it no worries...

     

     

    Please can somebody help as this lesson has held me up all week now!!!

     

     

    thankyou...

  4. how come i have have tryed to customise these pages names and for some reason the button page does not work

     

    Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\form_response.php on line 28

     

     

    the rest works

     

    i called the first page talos_form.php and it works fine

     

     

    the second page i called form_response.php and i get the above error when the button is pressed but it works ok on your link

     

    the third page i called form_query.php and the query link on the form works fine

     

    sorry to bother but the more mistakes i make the more i learn......

     

     

    thankyou

  5. sorry wickham tryed customizing the names of the files and changing were they are sent in the code

     

    what have you called the 2nd and third pages so i know what to look for!

     

     

    sorry buddy!

  6. thankyou wickham

     

    you are a star!!!

     

    Is there ant chance i could have your email to keep up my learning curve!

     

    I will totally understand if you say no!

     

     

    once again thankyou!

  7. error message has now changed to

     

     

    Notice: Undefined index: email in C:\wamp\www\form_response.php on line 20

     

    Notice: Undefined variable: first_name in C:\wamp\www\form_response.php on line 22

    First Name: with an email of:

     

     

     

     

     

     

    i corrected the code as below

     

     

    <div id="topbar"></div>

    <div id="navigation" class="container"></div>

    <div id="centerDoc" class="container">

    <div style="margin-top:25px; margin-bottom:20px; "> </div>

     

     

     

    <div>

     

    <?php

     

    if(isset($_POST['submit_button']))

     

     

    // FORM PROCESSING CODE - USING 'SUPER GLOBALS' - KILLERPHP.COM

     

    $first_name = $_POST['name_first'];

    $email = $_POST['email'];

     

    print "First Name: $first_name with an email of: $email"

     

    ?>

     

    </div>

  8. do not know what i have done wrong here, i have gone through the lesson 3 times now. lesson 6 video 2- 12mins 17 seconds

     

    i keep getting this error when i click on the Query string link to capture email

     

    the error Undefined index: name_first in C:\wamp\www\form_response.php on line 18

    <br />

    <b>Notice</b>: Undefined index: email in C:\wamp\www\form_response.php</b> on line 19

     

    First Name: with an email of:

     

     

    below is my code firstly for the form

     

     

    <!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>Untitled Document</title>

    <style type="text/css">

    body {

    background-color: #FFC;

    }

    </style>

    </head>

     

    <body>

    <br>

    <form method="post" action="form_response.php">

     

    <div class="form_element_div">

    First Name: <br> <input name="name_first" type="text" size="50" maxlength="200">

    </div>

    <div class="form_element_div">

    Email: <br><input name="email" type="text" size="50" maxlength="200"

    </div>

    <div class="form_element_div">

    Favorite colour:

    <INPUT type=radio value="red" name="colour">

    red

    <INPUT type=radio CHECKED value="yellow" name="colour">

    yellow

    <INPUT type=radio value="blue" name="colour">

    blue

     

    </div>

    <br>

    <div class="form_element_div">

    Favorite Website:

    <select name="favorite webite">

    <Option value="" selected>Please Select</Option>

    <Option value="www.killerstes.com">killersites.com </Option>

    <Option value="www.killerphp.com">killerphp.com </Option>

    <Option value="www.google.com">google.com </Option>

     

    </select>

    </div>

    <br>

     

    <div class="form_element_div">

    Comments: <br>

    <textarea name="comments" cols="50" rows="2" id="description" ></textarea>

    </div>

    <br>

    <div class="form_element_div">

    <input type="submit" name="submit_button" value="Submit Request >>" class="submit"

    </div>

    </form>

    </div>

     

    <div style="margin-top:25px;">

    <a href="form_response.php?email=videos&name=stefan">Query String</a>

    </div>

    </body>

    </html>

     

    and then the form response php page

     

    <div id="topbar"></div>

    <div id="navigation" class="container"></div>

    <div id="centerDoc" class="container">

    <div style="margin-top:25px; margin-bottom:20px; "> </div>

     

     

     

    <div>

     

    <?php

     

     

     

    // FORM PROCESSING CODE - USING 'SUPER GLOBALS' - KILLERPHP.COM

     

    $first_name = $_POST['name_first'];

    $email = $_POST['email'];

     

    print "First Name: {$first_name} with an email of: {$email}";

     

    ?>

     

    </div>

     

     

    can anybody please give me some advice

×
×
  • Create New...