PDA

View Full Version : Is this possible.



chrisgocrazyH
19-06-2007, 04:08 AM
Is this possible, ok i want to have a form where you type yourname & a big text area to right like heaps of stuff.. & i want it when you hit OK it saves that to a diffrent page? -LIKE AN EMAIL FORM BUT IT DOSENT GET SEND TO YOUR EMAIL IT GESTS SEND TO A PAGE THAT PEOPLE CAN READ IT (A DIFFRENT PAGE NO LIKE A SHOUT BOX WHERE IT GOES UP THE TOP)


Any help?


- Ill rep if u get a link or code it for me..

Sunny.
19-06-2007, 06:42 AM
Urm yes it is possible, its just a form which is sent to a .txt file on your server.

Beat
19-06-2007, 08:14 AM
What you could do, is store the information into a MySQL database. The name and message (or whatever it will be) would be stored in the database, then to view a comment you would have to get it from the database using a code.

You could use the text file way if you wished.

chrisgocrazyH
19-06-2007, 09:12 AM
Urm yes it is possible, its just a form which is sent to a .txt file on your server.


code please :)

Kieran
19-06-2007, 09:33 AM
Its basically a guestbook then.... :P

Just find a guestbook script and adapt it.

chrisgocrazyH
19-06-2007, 10:21 AM
Urm yes it is possible, its just a form which is sent to a .txt file on your server.


Its basically a guestbook then.... :P

Just find a guestbook script and adapt it.

It dosent work that way see, i basicly want a request script but no panel

k? & you dont have to to be memeber to look at em..

Colin-Roberts
19-06-2007, 10:51 AM
uh use a guestbook or shoutbox script and modifie it

Mentor
19-06-2007, 12:08 PM
It dosent work that way see, i basicly want a request script but no panel

k? & you dont have to to be memeber to look at em..

like a guest book.


- make form.
-form submit to php script, php proccess data sets it out. php appends html file with new data... people view html file to view all data?

Easy as pie.

Kieran
19-06-2007, 12:11 PM
Of course its a guestbook!

You enter the data. It gets added to the database. Then you recall it in a html file. Easy....

Which is what a guestbook is!

Aces
19-06-2007, 12:46 PM
Yup, as said.. I think it's a Guestbook your looking for.

Mentor
19-06-2007, 01:11 PM
ps, if you want the code, im not sure if i still have my old "simple guest book" script still uploaded, but if it is, you can pretty much just copy the useinfo.php 's file appending bit if you like. I wrote it years back though so the codeings fugly.

Ini
19-06-2007, 01:31 PM
Do you mean like a contact form and like only Admin's can see it through the Admin Panel?

:Edzy
19-06-2007, 02:48 PM
Is this possible, ok i want to have a form where you type yourname & a big text area to right like heaps of stuff.. & i want it when you hit OK it saves that to a diffrent page? -LIKE AN EMAIL FORM BUT IT DOSENT GET SEND TO YOUR EMAIL IT GESTS SEND TO A PAGE THAT PEOPLE CAN READ IT (A DIFFRENT PAGE NO LIKE A SHOUT BOX WHERE IT GOES UP THE TOP)


Any help?


- Ill rep if u get a link or code it for me..
Like a DJ Says?

Invent
19-06-2007, 03:07 PM
If you want to make a single page for each message just do this (I coded this in 2mins so it's rubbish, lol).


Wahetver.php:


<?php

if( $_GET[ "action" ] == "send" && $_POST[ "username" ] && $_POST[ "msg" ] ) {

$username = $_POST[ "username" ];
$message = $_POST[ "message" ];

$filename = rand( 0, 999999 );

$fopen = @fopen( "". $rand .".txt", "x+t" );
@fwrite( $fopen, "{$username}: {$message}" ) or die( 'Could not write data' );
@flclose( $fopen );

echo( "Message Saved, click <a href=\"". $rand.".txt\" target=\"_self\">here</a> to see your message!" );

}

else

{
?>
<form action="?action=send" method="post">
Username:<br />
<input type="text" name="username" />
<br /><br />
Messsge:<br />
<textarea name="msg"></textarea>
<br /><br />
<input type="submit" name="submit" value="Post" />
</form>
<?php

}

?>


It lets the user input their chosen Username & Message and then saves it to a file with a random name (numerical name).

chrisgocrazyH
19-06-2007, 11:41 PM
yes like DJ SAYS
like dj says?



- EDIT SOZ FOR DUBBLE POST
Quote:
Originally Posted by Invent http://www.habboxforum.com/images/buttons/viewpost.gif (http://www.habboxforum.com/showthread.php?p=3622086#post3622086)
If you want to make a single page for each message just do this (I coded this in 2mins so it's rubbish, lol).

Quote:
Originally Posted by Invent http://www.habboxforum.com/images/buttons/viewpost.gif (http://www.habboxforum.com/showthread.php?p=3622086#post3622086)


Wahetver.php:
PHP Code:

<?php


if( $_GET[ "action" ] == "send" && $_POST[ "username" ] && $_POST[ "msg" ] ) {

$username = $_POST[ "username" ];
$message = $_POST[ "message" ];

$filename = rand( 0, 999999 );

$fopen = @fopen( "". $rand .".txt", "x+t" );
@fwrite( $fopen, "{$username}: {$message}" ) or die( 'Could not write data' );
@flclose( $fopen );

echo( "Message Saved, click <a href=\"". $rand.".txt\" target=\"_self\">here</a> to see your message!" );

}

else

{
?>
<form action="?action=send" method="post">
Username:<br />
<input type="text" name="username" />
<br /><br />
Messsge:<br />
<textarea name="msg"></textarea>
<br /><br />
<input type="submit" name="submit" value="Post" />
</form>
<?php

}

?>





It lets the user input their chosen Username & Message and then saves it to a file with a random name (numerical name).





- I uploaded it to my SERVER & every time i do a message it goes "Could not write data"

__________________

chrisgocrazyH
19-06-2007, 11:46 PM
-SOZ For dubble post - i deleted whats in dis one & put on top one..

QuickScriptz
20-06-2007, 12:46 AM
Okay... well I have a script on my site called an "Eazy Logger" which writes data to a text file. All you would have to do is modify it to accept the data from a form that it puts in the text file and voila!

Click sig -> left hand side menu -> Freebies -> Eazy Logger

Don't forget to CHMOD the text file :)

chrisgocrazyH
20-06-2007, 01:16 AM
ill try it..



- i couldent do it soz..

Want to hide these adverts? Register an account for free!