Access data originating from HTML forms

Hi my php tutorial says that:

Create a file p-3-1.php with the following info:
<?php
//File p-3-1.php
phpinfo()
?>

  • simple, secondly, create a multiform, HTML form which I did.
  • Then point this file to the browser, basically fill in the form and “SEND” the data.
    Then it says When this form is executed it displays “an extensive report on the status of the php server and values of the forms” variables.

Now, my form is fine/done, but when I click on the submit button only a blank screen appears which displays nothing.

I would really like to know why this is please I am only learning php?

Info: I have placed both files on my local XAMPP server in the same directory.
Thank you:rolleyes:

phpinfo(); <- you were missing the semi-colon at the end of the line.

ps this forum is for more advanced questions, use the ordinary PHP - SitePoint Forums your questions will likely be answered quicker.

you also don’t need to submit a form, just put phpinfo(); in any page and it will display the information.

The only difference in doing a form submission is that you could see the posted data within the php info.

Hi

Thank you for the answers, a semicolon!!!

I added the semicolon and still I am getting a white screen with no info, why? To have a better idea as to understand how the php info is shown is it this: phpinfo(); that creates the phpinfo?
Ive posted the thread on:
http://www.sitepoint.com/forums/php-34/access-data-originating-html-forms-757667.html#post4878154 for beginners

Thank you

This is my simple form:
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>my first form</title>
</head>

<body>
<FORM METHOD=“post” ACTION=“p-3-2.php”>
<h3>Fill out the form</h3>
<BR />Your name
<BR /><INPUT TYPE=“text” NAME=“textbox” VALUE=“your name” >
<BR />Password box
<BR /><INPUT TYPE=“password” NAME=“passwordbox” >
<BR />Textarea

<BR /><TEXTAREA NAME=“textarea” ROWS=“5” COLS=“40” WRAP=“physical”>Enter your address here</TEXTAREA>
<BR />Checkboxes
<BR /><INPUT TYPE=“CHECKBOX” NAME=“breakfast” CHECKED >Breakfast
<BR /><INPUT TYPE=“Checkbox” NAME=“lunch” >Lunch
<BR /><INPUT TYPE="Checkbox"NAME=“Supper” >Supper
<BR />Radiobuttons
<BR /><INPUT TYPE=“Radio” NAME=“Radiobutton” VALUE=“French” CHECKED >French
<BR /><INPUT TYPE=“Radio” NAME=“Radiobutton” VALUE=“Italian” >Italian
<BR /><INPUT TYPE =“Radio” NAME=“Radiobutton” VALUE=“chinese” >Chinese
<BR />Select
<BR /><SELECT MULTIPLE NAME= “select”>
<BR /><OPTION VALUE=“Cheese”>Cheese
<BR /><OPTION SELECTED VALUE=“Salami”>Salami
<BR /><OPTION VALUE=“Red Pepper”>Red Pepper
</SELECT>
<BR /><INPUT TYPE=“Hidden” NAME=“Treasure” VALUE=“Inestimeable” >

<BR />
<BR />
<INPUT TYPE=“submit” NAME=“Submit” VALUE=“Send the data” >
</FORM

</body>
</html>

The form submits to p-3-2.php and yet you said phpinfo was on p-3-1.php.

Are you sure you are on the right page after submitting the form?

You should take a step back and just test phpinfo(); to verify that php is indeed working, before worrying about the form.