SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Sep 2010
    0 Post(s)
    0 Thread(s)

    Question Why does my code not work please??

    I am at my wits end here with this php scripting....
    I am just learning php to help me with my web forms, but after watching video tutorials it seems that even when I cut and paste the EXACT code as the video, mine does not work the same??
    I mean I do not change a single thing at all, but on the video their scripts work, but when I use the same script I get unpredictable results that are NOTHING like what they got....
    Most recently, I was trying to use php to process form data from an html webpage I designed, but instead of getting the results that the tutorial got, I am getting php script all over the page, and echo written out, which makes no sense to me at all.
    myform.JPG this is my webpage with the form to enter data.
    myresults.JPG this is what comes out from the php file that is supposed to process the form data.
    PHP Code:
    $var2 $_POST['phone'];
    $var3 $_POST['email'];
    "Telephone number is " $var2 "<br />;
    echo "
    Email address is " . $var3 . "<br />;
    "Full name is " $var1 "<br />;
    this is my php script
    I cannot understand why echo is being shown on the webpage at all, nor why it is ignoring the full name variable??
    Can someone PLEASE explain what is happening here??
    Attached Images Attached Images

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts