NameSilo

Guestbook integration

Spaceship Spaceship
Watch

zack

Account Closed
Impact
5
So the page is http://CherreysExhaust.com/guestbook.htm
I want a signing form below the "Sign" header in a cell. And I want the entrys displayed below the "guestbook/testimonials" header.

I having trouble finding a form that will fit into the cell or without ads. Anyone know how I can do this?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Are you looking for an entire system? Do you have the PHP or anything else, processing backend of it?

Or are you just looking for an HTML form?

- Steve
 
0
•••
I want something simple. I've got php, but I don't have a lot of experiance with it. I was just planning on using iframes to view the entry page.
 
0
•••
I would recomend making your own flat file guestbook.
All you have to do for this, is creat a simple form, under the sign section, and then create an Iframe in the other section.
have the form post to a .txt file, or html file, and then have the Ifram show the contents of that file.

If you need help with that let me know.
Some will say this is not good, but its simple.
 
0
•••
Simple is good! If you could point me towards a step by step tut that would be great. I have zero clue how to do this - I can make a form with FP but thats where I'll stop lol.
 
0
•••
zack said:
Simple is good! If you could point me towards a step by step tut that would be great. I have zero clue how to do this - I can make a form with FP but thats where I'll stop lol.

I dont know of a tut, but if you create the simple form in FP, make it have these settings:

method="post"
action="your file to post to"

Then just create the borderless iframe, and include the file in it.
 
0
•••
Ok - I'll try that and get back to you.
Do I have to adjust the permissions of the writable file?
 
0
•••
I gather you can do the rest. So below is a few guestbook scripts. They use flatfile. I would suggest either <?php include("guestbookfilename.php"); ?> or <iframe src="guestbookfilename.php"></iframe> to include the guestbook.

Links:

http://www.promosi-web.com/script/guestbook/
http://bobschwarz.com/modules/mydownloads/singlefile.php?lid=4

- Steve

zack said:
Ok - I'll try that and get back to you.
Do I have to adjust the permissions of the writable file?

You can take my examples and see how they did it.

Yes it does require premissions of 0777 to be able to add data too it. Sometimes 0666 will work.

- Steve
 
0
•••
iNod said:
Yes it does require premissions of 0777 to be able to add data too it. Sometimes 0666 will work.

You are correct sir!
 
0
•••
I do recommand you add ip checking or a little admin area so you can delete the messages that are posted. As some people like to post garbage. So you can add a little thing to disallow blocked IPs from posting but not from viewing your website. Just so you can keep your customers or maybe customers happy :)

- Steve
 
0
•••
I thought I knew how to create a form but I guess I don't. Anyone have a script to input into FP so I can fit it properly? (sorry for being so useless)
 
0
•••
zack said:
I thought I knew how to create a form but I guess I don't. Anyone have a script to input into FP so I can fit it properly? (sorry for being so useless)

Try this:
Code:
<html>
<form method="post" enctype="multipart/form-data" action="your-file-here">
  <p>
  <input type="hidden" name="require" value="name,textfield,textarea">
   <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
</p>
  <TABLE WIDTH=200 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
    <tr> 
      <td><div align="right"><strong>Name:</strong></div></td>
      <td><div align="center"> 
          <input name="name" type=text size="20">
        </div></td>
    </tr>
    <tr> 
      <td><div align="right"><strong>Email:</strong></div></td>
      <td><div align="center"> 
          <input name="email" type=text size="20">
        </div></td>
    </tr>
    <tr> 
      <td><div align="right"><strong>Title : </strong></div></td>
      <td><div align="center"> 
          <input name="textfield" type="text" size="20">
        </div></td>
    </tr>
    <tr> 
      <td><div align="right"><strong>Body (Message): </strong></div></td>
      <td><div align="center"> 
          <textarea name="textarea" cols="20" rows="10"></textarea>
        </div></td>
    </tr>
    <tr> 
      <td><div align="right"></div></td>
      <td><div align="center"> </div></td>
    </tr>
    <tr> 
      <td colspan="2"><div align="right"> 
          <input type="submit">
        </div></td>
    </tr>
  </table>
</form>
</html>
 
0
•••
THanks for the code Oulzac. I placed it in my cell. Now I need to know what to do with these forms...
The page with forms is up if you want to look at the code.
click here
 
Last edited:
1
•••
First thing you need to do is create the processing PHP End of it. Than name it something like guestbook.php and change action in your form tag to action="guestbook.php" or what ever you named it.

- Steve

PS. Thanks for the Rep :)
 
0
•••
Np...

Ok..I did that...Now when I submit it loads that page (guestbook.php).

Is this all I do? besides setting the permissions?
 
1
•••
zack said:
Np...

Ok..I did that...Now when I submit it loads that page (guestbook.php).

Is this all I do? besides setting the permissions?
First make sure the .php file is set to permission 666.
Then in your page, create the Iframe where you want to show it, and set its contents to the file.
 
0
•••
When I put the iframe in my page messes up (im slicing). Can I lock a cell's dimensions?

Also, is the all I do to get the form to write to the php file?
 
0
•••
zack said:
When I put the iframe in my page messes up (im slicing). Can I lock a cell's dimensions?

Also, is the all I do to get the form to write to the php file?

If you mean you sliced a photoshop image, and saved for web, and that block is an image it should look like this:

Code:
<TD><IMG SRC="image" WIDTH=x HEIGHT=x></TD>

you would need to change it to this:

Code:
<TD background="images" WIDTH=x HEIGHT=x>ifram will go here</TD>

Then you will add this where the iframe goes:

Code:
<iframe name="name" src="guestbook.php"></iframe>

So it should look like this completed:

Code:
<TD background="images" WIDTH=x HEIGHT=x>
<iframe name="name" src="guestbook.php"></iframe></TD>

You will probably have to play with the Iframe size a little too.

If you want, you can PM me the code for the page, and I will make the changes for you, and send it back ;)
 
0
•••
Thanks, that code worked beautiful. So should the guestbook work after I namd the action and set the php permissions?
 
0
•••
zack said:
Thanks, that code worked beautiful. So should the guestbook work after I namd the action and set the php permissions?
Yes, it should work.
 
0
•••
Hmm. Doesn't seem to be working. When I click to submit my info it takes me to "http://cherreysexhaust.com/guestbook.php" which is blank....THen I went back the the guestbook and refreshed the page and my info wasnt there. I also right clicked the iframe page and pressed refresh.

http://cherreysexhaust.com/guestbook.htm to check for yourself.

Does the php page require any coding?
 
0
•••
zack said:
Hmm. Doesn't seem to be working. When I click to submit my info it takes me to "http://cherreysexhaust.com/guestbook.php" which is blank....THen I went back the the guestbook and refreshed the page and my info wasnt there. I also right clicked the iframe page and pressed refresh.

http://cherreysexhaust.com/guestbook.htm to check for yourself.

:lol: Sorry, maybe I should not try to help people late at night when drinking ;)

I skipped major steps, here is what I left out.

Okay, first, create a new file, call it gbdata.txt, set the permission of this file to 666.
then change the permission of guestbook.php back to 644.
Now edit guestbook.php and add this code to it:

Code:
<?
$handle = fopen("gbdata.txt", "w+");
$text = "$HTTP_POST_VARS";
fwrite($handle, $text);
fclose($handle);
header("Location: http://cherreysexhaust.com/guestbook.htm"); 
?>

Now if in the Ifram all it says is array, let me know.

opps, forgot to say, to change the file the iframe loads to the .txt file, and not the php file ;)
 
0
•••
Haha. I couldn't imagine trying to code drunk. I cant sober. Don't make me a priority man - I don't expect you to keep helping me!

Something funny loads in the iframe.
http://cherreysexhaust.com/guestbook.htm to see it.

Maybe i inserted the code wrong. Thi is how i did it.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<p><!--webbot bot="HTMLMarkup" startspan --><?
$handle = fopen("gbdata.txt", "w+");
$text = "$HTTP_POST_VARS";
fwrite($handle, $text);
fclose($handle);
header("Location: http://cherreysexhaust.com/guestbook.htm");
?><!--webbot bot="HTMLMarkup" endspan --></p>

</body>

</html>
 
0
•••
First I forgot to tell you to change the file loads in the iframe to the .txt file and not the .php file.

Then in the .php file, the only thing that should be in there is the code I gave :
<?
$handle = fopen("gbdata.txt", "w+");
$text = "$HTTP_POST_VARS";
fwrite($handle, $text);
fclose($handle);
header("Location: http://cherreysexhaust.com/guestbook.htm");
?>

Nothing else, remove all that other stuff
 
0
•••
Now it says "array" in the iframe!
I'm getting excited! lol
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back