| | |
Running VERY BASIC PHP script ???
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I'm rather new at PHP.
I'm trying to run a script, but every time I do so, I'm not quite getting the output I should be getting.
I'm using this my Dreamweaver at home & working on the simple examples from this website http://www.php.net/manual/en/tutorial.forms.php
I've typed in:
index.html file
action.php
Every time I run "index.html", although I can see the "form" & after typing "name" and "age", as soon as I press the "Submit Query" button, I get a pop-up message (as if it's opening a file "action.php" & when I say "Open", I get another pop-up message saying:
"Invalid Menu handle"
RATHER THAN the output, which I think I should be getting:
a message SIMILAR to "Hi Joe. You are 22 years old." (as it can be seen from the example given on the PHP website).
I'm trying to run a script, but every time I do so, I'm not quite getting the output I should be getting.
I'm using this my Dreamweaver at home & working on the simple examples from this website http://www.php.net/manual/en/tutorial.forms.php
I've typed in:
index.html file
PHP Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="action.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Your age: <input type="text" name="age" /></p> <p><input type="submit" /></p> </form> </body> </html>
action.php
PHP Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> Hi <?php echo $_POST['name']; ?>. You are <?php echo $_POST['age']; ?> years old. </body> </html>
Every time I run "index.html", although I can see the "form" & after typing "name" and "age", as soon as I press the "Submit Query" button, I get a pop-up message (as if it's opening a file "action.php" & when I say "Open", I get another pop-up message saying:
"Invalid Menu handle"
RATHER THAN the output, which I think I should be getting:
a message SIMILAR to "Hi Joe. You are 22 years old." (as it can be seen from the example given on the PHP website).
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
It sounds very much like you do not have PHP installed on your machine, or if you are using a hosting account, that they do not have PHP installed.
If you are developing and have installed PHP locally then there is a problem with your installation.
If you are developing and have installed PHP locally then there is a problem with your installation.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
•
•
Originally Posted by Lafinboy
It sounds very much like you do not have PHP installed on your machine, or if you are using a hosting account, that they do not have PHP installed.
If you are developing and have installed PHP locally then there is a problem with your installation.
I've downloaded a program called "XAMPP" (as you can see in the attached image), from the link seen on PHP's official website.
I downloaded it from: http://www.apachefriends.org/en/xampp-windows.html
Basically, this application is a combination of "MySQL", "PHP", "Apache" & "FireZilla ftp" (as it can be seen from the attached image).
In the attached image, you can notice that:
>> next to "MySQL", it says "Running"
>> next to FireZilla", it says "Running"
>> next to Apache, it DOES NOT say running
BUT in the message area (white spaced), it DOES say "Apache service started", so does it not mean the Apache is ALREADY RUNNING or does the missing "Running" means it's NOT connected ???
Does it get connected easily OR do we have to wait & try AGAIN & AGAIN to get connected to Apache ???
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
![]() |
Similar Threads
- How can I send variables from a PHP script to another URL using POST without......... (PHP)
- cPanel: email account creation. I need help making a PHP script. (PHP)
- question about connecting odbc to sql through php script (PHP)
- how to find stock information with php script (PHP)
- need help with PHP Script translation (PHP)
Other Threads in the PHP Forum
- Previous Thread: help with finding right code
- Next Thread: finding page size
| Thread Tools | Search this Thread |
.htaccess ajax apache api array beginner binary broken buttons cakephp checkbox class cms code cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail mediawiki menu mlm mod_rewrite multiple mysql number oop paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search server sessions sms soap source sp space speed sql subdomain syntax system table tag tutorial update upload url validation validator variable vbulletin video web websphere white xml youtube





