Php form problems
Posted: Sun Apr 23, 2006 8:31 pm
feyd | Please use
Than the main page looks like this
You can tell what the user3.php page consists of because it's in the action3.php
in the entity of the "reset" script that I tried to make, but only succeeded by making it like a password, or administer right. I want the reset to be a button so that anyone can reset the form. You might want to know why, but that reason is just for experimental purposes. I would greatly appreaciate any help I can get.
THANK YOU!
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I've recently got into the new world of php and html programming in the "form" sections. I've put together a code that will submit and create a page with a table that includes specified information from textboxes and such, I'm having a problem creating a reset button because the first form in my page allways seems to conflict in the new form that I make, or new button that I make to send different information to the same page. The main problem may because I want to access all the control from just one page. I have 4 pages; the main.php, the action3.php, the user3.php, and the style.css. Mainly all the programming of submission is in the action3.php which looks like this:Code: Select all
<form method=post>
<center>Name: <input type="text" name="user"><br>
<center><textarea name=comment>Post a comment to the site.</textarea><br>
<center><input type="submit" name="Submit" value="Post Comment" action=
<?php
$username = $_POST['user'];
$comment = $_POST['comment'];
$def = "<td>$username $comment</td><tr>\n";
$daf = $username;
if ( $daf == "reset form" ) {
$daf = "<html><body bgcolor=white><center><font size=4><b>This is my first dynamic posting board.</b><br><br><table border=1 rows=1><tr><td><b>Username |<b> Comment</td></tr>";
$aol = "w";
} else {
$daf = $def;
$aol = "a";
}
$f = fopen("user3.php", "$aol");
fwrite($f, $daf);
fclose($f);
?>></form>Code: Select all
<head><title>Entity Servers</title><link rel="stylesheet" type="text/css" href="style.css"/></head>
<center>
<table border=0><tr><td>
<?php include("user3.php") ?></td></tr><td>
<?php include("action3.php") ?>
<br>
<a href=main.php>Refresh view of all Comments.</a><br>
<center>Entity Servers All rights Reserved.
</td></tr></table><br><br>
</html>in the entity of the "reset" script that I tried to make, but only succeeded by making it like a password, or administer right. I want the reset to be a button so that anyone can reset the form. You might want to know why, but that reason is just for experimental purposes. I would greatly appreaciate any help I can get.
THANK YOU!
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]