| | |
Returning values from PHP file
Thread Solved |
•
•
•
•
Hi, I m new in this field. Actually I face a problem, I call a php file from a html file using javascript. I declare a variable in php file,I want to use this variable in the same html file after execution of php file.Please help.
Add .htaccess file to your directory
Inside the .htaccess file input :
PHP Syntax (Toggle Plain Text)
AddType application/x-httpd-php .html .htm AddHandler application/x-httpd-php .html .php .htm
This should allow you to use php in your .html files
Search Engine | Free Flash Games | Play Online Games | One Way Permanent Links | Online Games
If A equals success, then the formula is
_ A = _ X + _ Y + _ Z. _ X is work. _ Y is play._ Z is keep your mouth shut.
-- Albert Einstein
If A equals success, then the formula is
_ A = _ X + _ Y + _ Z. _ X is work. _ Y is play._ Z is keep your mouth shut.
-- Albert Einstein
If you're using JavaScript to call a PHP file, then it sounds like AJAX. In which case you would have to use the DOM to display the result of the PHP script. Please show us the script you're using.
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." - Robert Wilensky
•
•
Join Date: Sep 2008
Posts: 25
Reputation:
Solved Threads: 1
•
•
•
•
If you're using JavaScript to call a PHP file, then it sounds like AJAX. In which case you would have to use the DOM to display the result of the PHP script. Please show us the script you're using.
window.location.href = "loginCheck.php?idValue=" + idValue;
I use this code to pass a single value, how can i pass more than one value?
•
•
•
•
Thank Shanti. Can u explain how can i use hidden variable in php.
html Syntax (Toggle Plain Text)
b>TicTacToe</b><br> Enter Move X.<br> <pre> <form action="tictactoe.php" method="GET"> <input type="text" name="move" size=2> 0|x|2 <br> _|_|_ <br> 3|4|o <br> _|_|_ <br> 6|7|8 <br> </pre> <input type="hidden" name="board" value="0x234o678"> </form>
Last edited by Shanti Chepuru; Sep 19th, 2008 at 7:18 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
Join Date: Sep 2008
Posts: 25
Reputation:
Solved Threads: 1
•
•
•
•
see this example:html Syntax (Toggle Plain Text)
b>TicTacToe</b><br> Enter Move X.<br> <pre> <form action="tictactoe.php" method="GET"> <input type="text" name="move" size=2> 0|x|2 <br> _|_|_ <br> 3|4|o <br> _|_|_ <br> 6|7|8 <br> </pre> <input type="hidden" name="board" value="0x234o678"> </form>
![]() |
Similar Threads
- PHP blog from flat file (PHP)
- Cold fusion do not support input param: Help (ColdFusion)
Other Threads in the PHP Forum
- Previous Thread: passing more than one values to php file
- Next Thread: Help for Newbie! Need to create a link to larger image target _blank in PHP
Views: 1088 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for PHP
access ajax apache array arrays beginner binary box broken buttons cakephp check checkbox class cms code cookies database date delete directory display download dropdown drupal dynamic echo email error file files form forms function functions header href htaccess html image images include insert ip java javascript joomla jquery limit link list login loop mail menu mlm mod_rewrite multiple mysql order output parse password paypal php problem query radio regex remote results script search security select server session sessions soap sort sorting source sql string system table tutorial unicode update upload url user validation validator variable video web website wordpress xml






