• Log in or sign up for an account here: https://www.sythe.org/login

php form

Chandler789

Active Member
Joined
May 29, 2006
Sythe Gold
0
Messages
190
php form
can some one give me a link to a tut or example of a php form that u can submt and it will send to an e-mail address or save in a database or file. (I'm trying to make a request for emails, becuase u have to make them in vDeck -.-)
 
php form
thats not a form, and it doesnt descibe it very well, thats sora like forum mail


heres what i'm looking for, and i want it to email me or save intoa database/ file


<div align="right">
<html><body>
<h4>Email request forum</h4>
<form method="post" enctype="multipart/form-data" action=getemail.php">
current email:(for contact) <input type="text" name="Contact Info" />
<br>Requested email: <input type="text" name="Requested email" />
<br>Requested password: <input type="text" name="requested email password" name="requested email password" />
<br>EO Forum name: <input type="text" name="Eternity Online Forum name" />
<br>RK Forum name: <input type="text" name="RuneKeep Forum name" />
<br><input type="submit" />
</form>
</body></html></div>
 
php form
ok so in your getmail.php file, those values would be.
$_POST['Contact Info'];
$_POST['Requested email'];
etc etc etc

so you can then use those values to store in db.
 
php form
oh, i have thoughs aswell, i just need to know how to store it...
 
php form
I'm confused, do you even know PHP or HTML?

You said you wanted form data sent to your email or stored in a database or file, right? I gave you the mail function. If the mail function is too difficult for you I'm sure the file i/o or mysql functions will be aswell. Anyways, check these out:
http://us2.php.net/manual/en/function.file.php
Look for fopen(), fwrite(), fread(), and fclose().

http://us2.php.net/manual/en/ref.mysql.php
Code:
<div align="right">
<html><body>
[color=red]DIV outside of HTML/BODY. Not allowed.[/color]
<h4>Email request forum</h4>
<form method="post" enctype="multipart/form-data" action=getemail.php">
[color=red]Multipart enctype is for uploading. Remove it. Missing a quote on your action.[/color]
current email: (for contact) <input type="text" name="Contact Info" />
<br>Requested email: <input type="text" name="Requested email" />
<br>Requested password: <input type="text" name="requested email password" name="requested email password" />
[color=red]Duplicate name attribute. Remove one.[/color]
<br>EO Forum name: <input type="text" name="Eternity Online Forum name" />
<br>RK Forum name: <input type="text" name="RuneKeep Forum name" />
<br><input type="submit" />
</form>
</body></html></div>
[color=red]You should keep your form data names simpler, aswell.[/color]
 
php form
.... i need to know how to make it send it to the file, i relise if its file (perfibly) it has to be chome 777
 
php form
I give up. I showed you how to already.. Several times, several ways.
 
php form
I give up. I showed you how to already.. Several times, several ways.

i agree, mellow showed you the way to do it. if you dont know ANY html or php go learn some.
 
php form
-.o I've never done somthing liek that before, and i followed a tutrail the first time and it dint work... and that one dint work to well either, i want it to POST it in a file or data base then, let me get that straight, rather then going thogh the STMP proccess
 
php form
lol this is probably so he can make a "Become a Mod" website and steal accounts
 
php form
wtf? no it isnt, it to request emails lol. google Eternity Online. or RuneKeep. EO was shut off, because i dint have $200 more for hosting lol.
 
php form
I will help you man, have you ever used a database system before? like mysql? and do you currently host a website?
 
php form
woth mysql when someone inserts text into your form in sends there info and stores it in a table in the database. and then you need to program a script to view the info that was submitted to I suggest you have me program you a form that will send the info to your e-mail. is that ok?
 
php form
Code:
<form method="post" action="<?php echo($PHP_SELF) ?>">
 <fieldset>
 <legend>Email Form</legend>
 <p><label>Name:</label><input type="text" name="name" id="name"></p>
 <p><label>Email:</label><input type="text" name="email" id="email"></p>
 <p><label>Comments:</label><input type="text" name="comments"  id="comments"></p>
 <p><input type="submit" name="submit" id="submit" value="Send Message"></p>
 </fieldset>
</form>

<?php
  
  # Add your email address
  $to = '[email protected]';
  # Add a default subject
  $subject = 'You Have Mail From Your Website';
  $loc = $_SERVER['PHP_SELF'];
  $name = $_REQUEST['name'];
  $email = $_REQUEST['email'];
  $comments = $_REQUEST['comments'];
  $submit = $_REQUEST['submit'];
  $body = "You have received an email from $name \n ($email) \n \n $name wanted to tell you: $comments \n \n He sent this message from $loc";

  if(isset($submit)) {

  mail($to, $subject, $body);}

  ?>

Custom job by me.
 
php form
Thanks but I made one more complex so it just write to the actual email database, thanks for the examples though
 
php form
More complex? These aren't complex to begin with.

Email Entry Form
Code:
<form action="save.php" method="post">
<input type="name" name="content">
<br>
<input type="submit" value="Save">
</form>

save.php
Code:
<?
$content = $_POST['content'];
    $entry_line = "$content \n";
    $fp = fopen("emails.txt", "a");
    fputs($fp, $entry_line);
    fclose($fp);    
?>

CHmod emails.txt to 777 for world-access or 222 to access only from your FTP client (as this would cause a 403 error if accessed from site.)

Another custom by me.

(You can VERY easily customize this to more forms just by some simple copying + pasting, if you can't do that - then go learn PHP/HTML. http://w3schools.com)
 
Runescape Gamblingrunescape gambling
Back
Top