Hi my php tutorial says that:
Create a file p-3-1.php with the following info:
- 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.
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.
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
This is my simple form:
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>my first form</title>
<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 NAME=“textarea” ROWS=“5” COLS=“40” WRAP=“physical”>Enter your address here</TEXTAREA>
<BR /><INPUT TYPE=“CHECKBOX” NAME=“breakfast” CHECKED >Breakfast
<BR /><INPUT TYPE=“Checkbox” NAME=“lunch” >Lunch
<BR /><INPUT TYPE="Checkbox"NAME=“Supper” >Supper
<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 MULTIPLE NAME= “select”>
<BR /><OPTION VALUE=“Cheese”>Cheese
<BR /><OPTION SELECTED VALUE=“Salami”>Salami
<BR /><OPTION VALUE=“Red Pepper”>Red Pepper
<BR /><INPUT TYPE=“Hidden” NAME=“Treasure” VALUE=“Inestimeable” >
<INPUT TYPE=“submit” NAME=“Submit” VALUE=“Send the data” >
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.