The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: sdfadf | July 23, 2010 @ 6:20pm
PHP Code
[
Download
]
<html> <head> <script type="text/javascript" src="prototype.js"></script> <script> function sendRequest() { new Ajax.Request("test.php", { method: 'post', parameters: { id:$F('id'), name:$F('name') }, onComplete: showResponse }); } function showResponse(req){ $('show').innerHTML= req.responseText; } </script> </head> <body> <form id="test" onsubmit="return false;"> <input type="text" name="name" id="name" > <input type="id" name="id" id="id" > <input type="submit" value="submit" onClick="sendRequest()"> </form> <div id="show"></div> </body> </html> <?php $name=$_GET["name"]; if($_GET["name"] == "") echo "name is empty"; else echo "you typed".$name; ?> Notice: Undefined index: name in C:\wamp\www\Project\test.php on line 2 Notice: Undefined index: name in C:\wamp\www\Project\test.php on line 4 name is empty
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.64 / 8
44 Votes
http://codebin.yi.org/756
page generated in 0.01 seconds