| | |
Returning values from PHP file
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
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
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 8: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
| Thread Tools | Search this Thread |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube






