NameSilo

Guestbook integration

SpaceshipSpaceship
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.
GoDaddyGoDaddy
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
•••
zack said:
Now it says "array" in the iframe!
I'm getting excited! lol

okay, now we are getting somewhere.
I have to step out for a little bit, but will post back when I get back in ;)
 
0
•••
Np at all. This doesn't have to be done tonight. I just gave you 10NB - Sorry for being cheap...I'm saving for a domain.
 
0
•••
zack said:
Np at all. This doesn't have to be done tonight. I just gave you 10NB - Sorry for being cheap...I'm saving for a domain.
Thanks for the NP$ :)

Okay, here is the work around for the array issue.

First open your form file and make these changes:
Change this:
Code:
<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>
To this:
Code:
<form method="get" enctype="multipart/form-data" action="gb.php">
  <p>
     </p>

Then open your .php file (the one that does the processing and
replace the entire thing with this and save:
PHP:
<?
$name = $_GET["name"];
$email = $_GET["email"];
$title = $_GET["textfield"];
$message = $_GET["textarea"];
$handle = fopen("gbdata.txt", "a");
if (!$handle) {
print("Could not append to file");
exit;
}
fputs ($handle,implode,("\n"));
fwrite($handle,"<b>$name</b><br /><b>$email</b><br /><b>$title</b><br />$message<br /><br />");
fclose($handle);

header("Location: http://cherreysexhaust.com/guestbook.htm"); 
?>

Now this does not show the date of the post, and it puts them in accending, not decending.

If you want to change these let me know.
 
0
•••
Hmm. It doesn't seem to be working correctly.
www.cherreysexhaust.com/guestbook.htm

I don't think I changed the form code correctly.
This is what it was before I made the changes.

<form method="post" width=195 enctype="multipart/form-data" action="guestbook.php"> <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT"> <input type="hidden" name="require" value="name,textfield,textarea">
<TABLE WIDTH=136 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0> <tr> <td>
<div align="center"><font face="Verdana" size="2" color="#333333">
<strong style="font-weight: 400">Name</strong></font></div><div align="center">
<input name="name" type=text size="20"> </div></td> </tr> <tr> <td>
<div align="center"><font color="#333333" face="Verdana" size="2">
<strong style="font-weight: 400">Email</strong></font></div><div align="center">
<input name="email" type=text size="20"> </div></td> </tr> <tr> <td>
<div align="center"><strong style="font-weight: 400">
<font color="#333333" face="Verdana" size="2">Title</font></strong></div><div align="center"> <input name="textfield" type="text" size="20"> </div></td> </tr> <tr> <td>
<div align="center"><strong style="font-weight: 400">
<font color="#333333" face="Verdana" size="2">Message</font><font face="Verdana">
</font></strong></div><div align="center">
<textarea name="textarea" cols="20" rows="5"></textarea> </div></td> </tr> <tr>
<td><div align="right"> <input type="submit"> </div></td> </tr> </table> </form>

I changed the "method=" "enctype=" and "action=" to what you said and it worked out to what you see on online now (link to guestbook at top).

PS. I also changed (action="gb.php") to (action=guestbook.php)
Was I right in doing this?
 
Last edited:
0
•••
Yeah, changing that gb to guestbook was good.

You need to open the form html page, and highlight the first part that I posted in my last post, and then copy the part I said to change it to, and past it over, It needs to be exactly like that.
See yours still looks like this:
Code:
<form [B]method="[COLOR=Blue]post[/COLOR]"[/B] width=195 enctype="multipart/form-data" action="guestbook.php"> <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT"> <input type="hidden" name="require" value="name,textfield,textarea">
and it needs to look like this:
Code:
<form [B]method="[COLOR=Blue]GET[/COLOR]"[/B] width=195 enctype="multipart/form-data" action="guestbook.php">

ONLY, I removed those other two lines on puropes, they should not be there.
 
0
•••
Hmm. Should it be working now?
I did exactly what you said with the post above.
It posted my info - but alkwardly and with a bit of code
The link...
www.cherreysexhaust.com/guestbook.htm
 
0
•••
Open up your .txt file and delete all that mumbo jumbo, lol

Then post to me the two files so I can compare them.
 
0
•••
mumbo jumbo el deleted-0
 
0
•••
hmm, everything looks correct.
It works on all my servers like this.
so, try this.
Change the .txt file to an .html file, and change the permission to 777.

I think the differance is I have phpsuEXEC on all my servers, and I think you do not on yours.

*note: you will have to change in the .php file, the .txt to .html aswell ;)
 
0
•••
I Love You Oulzack!
 
0
•••
zack said:
I Love You Oulzack!
I can't leave another zack hanging! :lol:

here is one more thing, go into FP (if thats what you use) and click on the outside frame of the Iframe, and once its selected, right click it and select properties, and set the border to '0' that way the black box is not around the frame.
 
0
•••
Oh yea us zacks gotta look out for each other! lol
Thanks for the iframe tip.. Looks nice!

Thanks for the help zac - If you ever need a favour don't hesitate to ask.
 
0
•••
No problem, and will do.
If you ever need or want to change anything on it, just let me know aswell ;)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back