Difference between revisions of "PHP 0"
From Ilianko
(Created page with "<pre> <body> <div> <form method="post" name="comment" action="" > <table> <tr> <td>Email: </td> <td><input name="email" type="text" size="20" maxlength="199" value="" ...") |
|||
Line 1: | Line 1: | ||
+ | |||
+ | == HTML форма == | ||
<pre> | <pre> | ||
<body> | <body> | ||
− | <div> | + | |
+ | <div style="position:relative; top:100px; left:100px"> | ||
<form method="post" name="comment" action="" > | <form method="post" name="comment" action="" > | ||
<table> | <table> | ||
Line 17: | Line 20: | ||
</form> | </form> | ||
</div> | </div> | ||
− | + | ||
</body> | </body> | ||
</html> | </html> | ||
+ | </pre> | ||
+ | |||
+ | == PHP вградени промеливи == | ||
+ | |||
+ | <pre> | ||
+ | <html> | ||
+ | <body> | ||
+ | |||
+ | <?php | ||
+ | |||
+ | print "<pre>"; | ||
+ | print "POST ->"; | ||
+ | print_r( $_POST); | ||
+ | |||
+ | print "GET ->"; | ||
+ | print_r($_GET); | ||
+ | print "SERVER ->"; | ||
+ | print_r($_SERVER); | ||
+ | print "SESSION ->"; | ||
+ | print_r($_SESSION); | ||
+ | |||
+ | print "</pre>"; | ||
+ | |||
+ | ?> | ||
+ | |||
+ | <div style="position:relative; top:100px; left:100px"> | ||
+ | <form method="post" name="comment" action="" > | ||
+ | <table> | ||
+ | <tr> | ||
+ | <td>Email: </td> | ||
+ | <td><input name="email" type="text" size="20" maxlength="199" value="" /></td></tr> | ||
+ | <tr> | ||
+ | <td>Име </td> | ||
+ | <td><input name="name" type="text" size="20" maxlength="60" value="" /></td></tr> | ||
+ | <tr> | ||
+ | <td>Коментар: </td><td><textarea name="comment" cols="43" rows="4"></textarea></td></tr> | ||
+ | <tr> | ||
+ | <td colspan="2" align="center"><input type="submit" name="submit" id="ss" value="Изпрати"> | ||
+ | </td></tr></table> | ||
+ | </form> | ||
+ | </div> | ||
+ | |||
+ | </body> | ||
+ | </html> | ||
+ | |||
</pre> | </pre> |
Revision as of 09:51, 7 October 2011
HTML форма
<body> <div style="position:relative; top:100px; left:100px"> <form method="post" name="comment" action="" > <table> <tr> <td>Email: </td> <td><input name="email" type="text" size="20" maxlength="199" value="" /></td></tr> <tr> <td>Име </td> <td><input name="name" type="text" size="20" maxlength="60" value="" /></td></tr> <tr> <td>Коментар: </td><td><textarea name="comment" cols="43" rows="4"></textarea></td></tr> <tr> <td colspan="2" align="center"><input type="submit" name="submit" id="ss" value="Изпрати"> </td></tr></table> </form> </div> </body> </html>
PHP вградени промеливи
<html> <body> <?php print "<pre>"; print "POST ->"; print_r( $_POST); print "GET ->"; print_r($_GET); print "SERVER ->"; print_r($_SERVER); print "SESSION ->"; print_r($_SESSION); print "
";
?>
<form method="post" name="comment" action="" >
Email: | <input name="email" type="text" size="20" maxlength="199" value="" /> |
Име | <input name="name" type="text" size="20" maxlength="60" value="" /> |
Коментар: | <textarea name="comment" cols="43" rows="4"></textarea> |
<input type="submit" name="submit" id="ss" value="Изпрати"> |
</form>
</body> </html>