-1

Here is the error: Parse error: syntax error, unexpected 'print' (T_PRINT) in /home/content/61/11435861/html/students/Dev/Lesson2b.php on line 17. Here is my HTML code:

<html>
<head>
    <title> Title for my web page </title>
</head>
<body>
    <form action="Lesson2b.php" method="post">
        Name: <input type="text" name="Name">
        <br>
        Last name: <input type="text" name="Lastname">
        <br>
        Age: 
        <input type="radio" name="Age" value="Child"> 1-12
        <input type="radio" name="Age" value="Teenager"> 13-19
        <input type="radio" name="Age" value="Adult"> 13-19
        <br>
        Gender: 
        <input type="radio" name="Gender" value="Male"> Male
        <input type="radio" name="Gender" value="Female"> Female
        <br>
        Favourite Color: <input type="text" name="Favcolor" value="">
        <br>
        Favourite Platform: <input type="text" name="Platform">
        <br>
        Mood: <input type="text" name="Mood">
        <br>
        Which continent are you from?: 
        <input type="radio" name="Continentality" value="Asia"> Asia
        <input type="radio" name="Continentality" value="North America"> North America
        <input type="radio" name="Continentality" value="South America"> South America
        <input type="radio" name="Continentality" value="Africa"> Africa
        <input type="radio" name="Continentality" value="Europe"> Europe
        <br>
        <input type="submit">
        <br>
    </form>
</body>

and here is my PHP code:

<html>
<head>
    <title> Small Survey </title>
</head>
<body>
    <?php
ifisset($POST['submit']);
    print("Hello : ");
    print($_POST['Name']);
    print(" ");
    print($_POST['Lastname']);
    print("<br>");
    print($_POST['Age']);
    print(", ");
    print($_POST['Gender']);
    print("<br>")
    print ($_POST['Favcolor']);
    print(" is ");
    print($_POST['Name']);
    print("'s favourite color");
    print("<br><br>");
    print($_POST['Name']);
    print(" loves using");
    print(" ");
    print($_POST['Platform']);
    print("!");
    print($_POST['Name']);
    print("is feeling ");
    print($_POST['Mood']);
    print("<br><br>")
    print($_POST['Name']);
    print(" ");
    print($_POST['Lastname']);
    print("is from the continent of ");
    print($_POST['Continentality']);
    ?>
</body>
any and all help is appreciated! Ignore the below please! I need to add more details so here it is: details

2 Answers2

0

change this:

ifisset

to this:

if isset

gpl
  • 1,380
  • 2
  • 8
  • 24
0

Try this

if(isset($_POST)){.......}