Page 1 of 1
vampires site
Posted: Sat Feb 06, 2010 10:15 pm
by White Fang
ok php is working 0.0! but now im having trouble storing the data that a user inputs into the text box in my join page O_o anyone have any code to help store the data >.<? the data being sents variable is "join" without quotation marks o.o...
heres the code for the text box:
<form method="post"
action="VRecruits.php">
<input type="text" name="join" value=""></input>
<input type="submit"></input>
</form>
and heres the code for php:
<?php
$join = $_REQUEST["join"];
print "thanks! $join but if your seeing this message i still havent got this to work lol o_O"
?>
i just need to know how to keep the data so i can view it later and contact them o.o
Re: vampires site
Posted: Sat Feb 06, 2010 10:21 pm
by 10010 1111 10
I'm not entirely clear on what you are attempting to do. Are you looking to have form data stored? If so I suggest using a html 'form data to email' method.
Re: vampires site
Posted: Sat Feb 06, 2010 10:24 pm
by White Fang
ok i'll try that but vleh! now ima gonna have to check email everyday or somethin ._.
Re: vampires site
Posted: Sat Feb 06, 2010 10:44 pm
by White Fang
nop not working O_O maybe i have error in code or something but all its doing is taking u to google O_O
Re: vampires site
Posted: Sun Feb 07, 2010 4:07 am
by Ghost
How exactly do you want the data stored? In a text file that you can view on your website or download from the FTP? Send it to your email? Either way you're going to be checking something on a regular basis.
Re: vampires site
Posted: Sun Feb 07, 2010 12:15 pm
by White Fang
i dont really know how to do it but is their a way to make it save on notepad o_o?
like i saw this code that automatically ran whenever the data was sent and it copy and pasted the data to and excel spreadsheet but im wondering if u can do that for notepad o.O?
Re: vampires site
Posted: Sun Feb 07, 2010 12:40 pm
by Ghost
VRecruits.php:
Code: Select all
<html>
<head>
<title>Results</title>
</head>
<body>
<?php
try
{
// set name
$name = $_POST["join"]
// file to be written to on server
$filename = "recruits.txt";
// open file for appending
$file = fopen($filename, 'a') or die("Unable to open file.");
// append
$data = "$name\n";
fwrite($file, $data);
// close file
fclose($file);
echo "Thank you, $name, for your submission."
}
catch { echo "Submission failed." }
?>
</body>
</html>
Re: vampires site
Posted: Sun Feb 07, 2010 2:20 pm
by SlipKnoT
White Fang wrote:ok i'll try that but vleh! now ima gonna have to check email everyday or somethin ._.
you dont do that already?!?! thats odd
Re: vampires site
Posted: Sun Feb 07, 2010 3:40 pm
by White Fang
thanks ghost its working now ^^
Re: vampires site
Posted: Fri Feb 11, 2011 5:21 pm
by leandro
I can enter the vampire clan?
Re: vampires site
Posted: Fri Feb 11, 2011 5:24 pm
by USOLA
leandro wrote:I can enter the vampire clan?
if you want to join the vampires clan go to
http://vampires.ee-clans.com/portal.php?p=Forum and under JOIN US submit a post