473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PHP echo string not showing up in my HTML form page nor is PHP page working?

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML> <html> <head> </head> <body> <form action=somefile.php method="post"> <?php echo="Hi" ?> <H2>Pizza</h2> <br> <h3>Toppings</h3> <br> <input type="checkbox" name="toppings[]" value="Pepperoni">Pepperoni<br> <input type="checkbox" name="toppings[]" value="Mushrooms">Mushrooms<br> <input type="checkbox" name="toppings[]" value="Anchovies">Anchovies<br> <input type="checkbox" name="toppings[]" value="Chicken">Chicken<br> <input type="checkbox" name="toppings[]" value="Green Peppers">Green Peppers<br> <input type="checkbox" name="toppings[]" value="Tomatoes">Tomatoes
  2. <br></br> <h3>Sizes</h2> <input type="radio" name="sizes" value="12" >12
  3. <input type="radio" name="sizes" value="14">14
  4. <input type="radio" name="sizes" value="16">16
  5. <br><br> <input type="submit" name="continue" value="continue"> </form> </body> </html>
Hello, I just starting learning PHP about a week ago along with other languages and I can't seem to get it to show up in a browser. I put this html form page, along with another form and the php file that'll be grabbing the variables on my server. When I open my Form page, the php echo'd message doesn't show, nor does any of the content on the PHP page that it calls?


I set the chmod for the PHP page to 644 and my html is 755. Should it also be 644? Or some other permission? Thanks.
Nov 11 '13 #1
3 3706
Exequiel
288 256MB
Is the file extension of this page is .html? because if it is .html you must change it into .php file extension, for example myhtmlpage.php instead of myhtmlpage.html,only in php file extension the <?php ?> - php tag works. so change your page into .php . . . .
Nov 11 '13 #2
itsraghz
127 100+
Just to add with what Exequiel had said, you should ensure you have a Web Server (example Apache) running on your computer that helps the PHP scripts to be processed.
Nov 12 '13 #3
johny10151981
1,059 1GB
Have to remove my last comment, cause i didnt see the entire code
Nov 19 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mark | last post by:
I have found many examples of how to access an HTML text field from PHP, but cannot find the reverse - how to load an HTML form from a MySQL database. Specifically, I have an HTML form which...
1
by: tomseye | last post by:
I have a simple form to collect user selections in html form. I am pretty new to php...how can I send the user's checkbox selects to me in an email...I am struggling with buiding an array to send...
16
by: Philippe C. Martin | last post by:
Hi, I am trying to change the data in a form field from python. The following code does not crash but has no effect as if "form" is just a copy of the original html form. Must I recreate the...
1
by: Michael | last post by:
Hello, I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
0
by: bp_jobemail | last post by:
I'm trying to use PHP to wrap the output of an HTML form before it goes into a precompiled C cgi script. Essentially, the company that I work for uses a purchased precompiled c program for their...
6
by: Carlo | last post by:
I have an html form that posts onto an asp.net page (vs2005). The form header is as follows: <form action="thankyou.aspx" method="post">. In a table i have the fields <td><input id="email"...
5
by: keeps21 | last post by:
A little problem I've run into is the following. I have a script that allows a user to edit a story. I have an HTML form for title and main_text which gets it's values by pulling the selected...
10
by: patsman77 | last post by:
I hope this is the right spot to post this.... I am working on a form to pull the information from the database. I am trying to use arrays, but I only get one record to come back and it is...
5
by: John Boyd | last post by:
I know I can post to page 2 but the problem is I need to capture the name, email (optional), and referral source. If i post to page 2 then it simply asks for the required fields. If I do get it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.