what are you asking in return?
i might want some work done, i need a login form created.
<form action="post.php" method="post">
<p>Full Name: <input name="fullname" type="text" value="" /></p>
<p>Email Address: <input name="email" type="text" value="" /></p>
<p>Subject: <input name="subject" type="text" value="" /></p>
<p>Message: <textarea name="message" value="" width="300" height="200"></textarea></p>
<input type="submit" value="Submit" />
</form>
<?php
$name = $_REQUEST['fullname'] ;
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
$msg = "from: $name
$message"
if(mail(name@host.com, $subject, $msg, $email))
{
echo "/*PLACE HTML IF SEND IS SUCCESSFUL*/";
}
else
{
echo "/*PLACE HTML IF SEND IS UNSUCCESSFUL*/";
}
?>
<?php
if(isset($_POST['submit'])) {
$to = "sohail@sohailtech.com";
$subject = "New Game Request";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$gametitle = $_POST['gametitle'];
$smallimg = $_POST['smallimg'];
$bigimg = $_POST['bigimg'];
$swflink = $_POST['swflink'];
$copyright = $_POST['copyright'];
$others = $_POST['others'];
$body = "From: $name_field\n E-Mail: $email_field\n Game Title: $gametitle\n Small Image: $smallimg\n Large Image: $bigimg\n Game Link: $swflink\n Copyright Evidence: $copyright\n Anything Else: $others";
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Submit Game</title>
<link href="/games/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="banner"></div>
<div align="center">
<div id="navigation"><a href="http://sohailtech.com/">HOME</a> • <a href="http://tutorials.sohailtech.com/content/blogsection/4/26/">FLASH TUTORIALS</a> • <a href="http://tutorials.sohailtech.com/content/blogsection/5/29/">PHOTOSHOP TUTORIALS</a> • <a href="http://tutorials.sohailtech.com">BLOG</a> • <a href="http://forums.sohailtech.com/">FORUMS</a> </div>
</div>
<div align="center"><br>
<?php
echo "Thanks for your request, it will be reviewed shortly!";
mail($to, $subject, $body);
} else {
echo "You have submitted an invalid form, please try again.";
}
?>
</div>
</body>
</html>
<?php
if(isset($_POST['submit'])) {
$to = "sohail@sohailtech.com";
$subject = "New Game Request";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$gametitle = $_POST['gametitle'];
$swflink = $_POST['swflink'];
$copyright = $_POST['copyright'];
$others = $_POST['others'];
$body = "From: $name_field\n E-Mail: $email_field\n Game Title: $gametitle\n Game Link: $swflink\n Copyright Evidence: $copyright\n Anything Else: $others";
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Submit Game</title>
<link href="/games/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="banner"></div>
<div align="center">
<div id="navigation"><a href="http://sohailtech.com/">HOME</a> • <a href="http://tutorials.sohailtech.com/content/blogsection/4/26/">FLASH TUTORIALS</a> • <a href="http://tutorials.sohailtech.com/content/blogsection/5/29/">PHOTOSHOP TUTORIALS</a> • <a href="http://tutorials.sohailtech.com">BLOG</a> • <a href="http://forums.sohailtech.com/">FORUMS</a> </div>
</div>
<div align="center"><br>
<?php
echo "Thanks for your request, it will be reviewed shortly!";
mail($to, $subject, $body);
} else {
echo "You have submitted an invalid form, please try again.";
}
?>
</div>
</body>
</html>
post.php
i don't know about sending it to a database.PHP:<?php $name = $_REQUEST['fullname'] ; $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; $msg = "from: $name $message" if(mail(name@host.com, $subject, $msg, $email)) { echo "/*PLACE HTML IF SEND IS SUCCESSFUL*/"; } else { echo "/*PLACE HTML IF SEND IS UNSUCCESSFUL*/"; } ?>
$gomysql = "Insert Into table_name(table_row_name_for_name,table_row_name_for_subject,table_row_name_for_message,table_row_name_for_email) Values('" .$name."', '" .$subject."', '" .$message."', '" .$email."')";
mysql_query ($gomysql);
You want to Write the form info in a .TXT for example?I don't want it to be in a db, is it possible to upload it to the server in a certain folder with FTP or something?
Sohail, DarkDragonLord was helping me with a form post.php page.
He/She was indirectly helping me. =P
I'll test it out and see what happens. But won't I have to tell it my MySQL Username and Pass?
<?php
$connmysql = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$connmysql) {
die('Could not connect: ' . mysql_error());
}
?>
include "conn.php"
mysql_close($connmysql);
<?php
$name = $_REQUEST['fullname'] ;
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
//Here: Connection to DB.
$connmysql = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$connmysql) {
die('Could not connect: ' . mysql_error());
}
//Here: add 2 DB string
$gomysql = "Insert Into table_name(table_row_name_for_name,table_row_name_for_subject,table_row_name_for_message,table_row_name_for_email) Values('" .$name."', '" .$subject."', '" .$message."', '" .$email."')";
$msg = "from: $name
$message"
if(mail(name@host.com, $subject, $msg, $email))
{
echo "/*PLACE HTML IF SEND IS SUCCESSFUL*/";
//Here: Adding stuff to DB
mysql_query ($gomysql);
}
else
{
echo "/*PLACE HTML IF SEND IS UNSUCCESSFUL*/";
}
//Here: Closing Connection to DB
mysql_close($connmysql);
?>