grats
2011-08-14 09:23:06
ok, how would I make the form bigger? like the whole text box..
I tried searching for a way to do a form in css but I couldn't find it -.-
[PHP]<?php
$name= $_POST["name"];
echo "status: ".$name;
$name_file = 'messages.txt';
$content= $name;
fopen($name_file, 'a+');
if (is_writable($name_file)) {
if (!$manager = fopen($name_file, 'a')) {
echo "We can't open ($name_file)";
exit;
}
if (fwrite($manager, $content) === FALSE) {
echo "We can't write to file ($name_file)";
exit;
}
echo " / Successfully sent. ";
fclose($manager);
} else {
echo "We can't write to $name_file";
}
?>
[/PHP]
and my php question, right now it rights to my .txt file which is cool, is there a way to maybe have it go down two lines for every separate message?
if not is there a way to save a different .txt per message.. like in a messages folder or something? it would have to be creating the .txt then too, instead of just writing to the .txt which I am not sure how to do at all
thanks for help
<html>
<body>
<br/>
<form name="contact" method="post" action="/scripts/contacts.php">
Please leave contact information if you want to be responded to...
<br/>
<input type="text" name="name" />
<input type="submit" value="Send"/>
</form>
</body>
</html>
I tried searching for a way to do a form in css but I couldn't find it -.-
[PHP]<?php
$name= $_POST["name"];
echo "status: ".$name;
$name_file = 'messages.txt';
$content= $name;
fopen($name_file, 'a+');
if (is_writable($name_file)) {
if (!$manager = fopen($name_file, 'a')) {
echo "We can't open ($name_file)";
exit;
}
if (fwrite($manager, $content) === FALSE) {
echo "We can't write to file ($name_file)";
exit;
}
echo " / Successfully sent. ";
fclose($manager);
} else {
echo "We can't write to $name_file";
}
?>
[/PHP]
and my php question, right now it rights to my .txt file which is cool, is there a way to maybe have it go down two lines for every separate message?
if not is there a way to save a different .txt per message.. like in a messages folder or something? it would have to be creating the .txt then too, instead of just writing to the .txt which I am not sure how to do at all
thanks for help