What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP - Gestbook.... help

PHP - Gestbook.... help
Author: Message:
distorted
New Member
*


Posts: 4
37 / Male / –
Joined: Jun 2007
O.P. PHP - Gestbook.... help
Ok i'm trying to work on a script where my friends (who have photo's on there photobucket accounts etc....) can upload the img url to my form and it adds it to a flattext file, basicly its a modifyed guestbook, but i have little/no knowladge of PHP, i have got this to work in some shape or form, but whats making me struggle is i cant get the new entrys to go to the top of the page instead of being added to the bottom. i know its not possable to write to the top of a flat text, and the way to do this would be to get it to open the existing content from the file and then add that to the end of the new entry, and write it all in at once....? but i dont know how... any suggestions. heres my code:


<html>
<head>
<title>Upload</title>
</head>
<body>
<?php
include('config.php');
$user = $_GET["name"];
$message = $_GET["message"];
print("<b>Thank You!</b><br />Your information has been added! You can see it by <a href=savedinfo.php>Clicking Here</a>");
$out = fopen("savedinfo.php", "a");
if (!$out) {
print("Could not append to file");
exit;
}
fputs ($out,implode,("\n"));
fwrite($out,"<CENTER><font size='2' face='Verdana'><A href='$user' target='_blank'><img src='$user' width='300' height='200' style='border-color:#000000' border='1'></a><BR>$message<BR><BR></font></CENTER>");
fclose($out);
?>
</body>
</html>

user/name is the url of the image, message is simply a description. Thankyou in advance.

Kirk
06-19-2007 05:29 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP - Gestbook.... help - by distorted on 06-19-2007 at 05:29 PM
RE: PHP - Gestbook.... help - by absorbation on 06-19-2007 at 07:56 PM
RE: PHP - Gestbook.... help - by Baggins on 06-19-2007 at 08:22 PM
RE: PHP - Gestbook.... help - by roflmao456 on 06-19-2007 at 08:23 PM
RE: PHP - Gestbook.... help - by Baggins on 06-19-2007 at 08:39 PM
RE: PHP - Gestbook.... help - by distorted on 06-20-2007 at 09:44 AM
RE: PHP - Gestbook.... help - by distorted on 06-20-2007 at 10:06 AM
RE: PHP - Gestbook.... help - by WDZ on 06-21-2007 at 02:10 AM
RE: PHP - Gestbook.... help - by distorted on 06-21-2007 at 07:00 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On