What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Who knows something about SQL and PHP

Who knows something about SQL and PHP
Author: Message:
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Who knows something about SQL and PHP
quote:
Originally posted by Exca
SHOUT.PHP
code:
<?
// BEKIJK README VOOR DETAILS

require("config.php");

if (!empty($_POST['name']) && !empty($_POST['shout'])) {
    $name=strtoupper($_POST['name']);
    $shout=strtoupper($_POST['shout']);
    $now=time();
    $sql=mysql_query("INSERT INTO shoutbox (id,date,name,shout) VALUES ('','$now','$name','$shout')")
     or die("&error=ERROR: ERROR INSERTING&content=SEE ERROR DETAILS");
   
    echo"&error=RECEIVED YOUR SHOUT";
}
else {
    $sql=mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 50")
     or die("&error=ERROR: WRONG QUERY&content=SEE ERROR DETAILS");
   
    if(mysql_numrows($sql)==0) {
        echo"&error=ERROR: RETURNED EMPTY&content=SEE ERROR DETAILS";
    }
    else {
        while($row=mysql_fetch_array($sql)) {
            $content="$content"."$row[name]:\n$row[shout]\n\n";
        }
        echo"&content=$content";
    }
}
?>

there is your problem ;)
01-05-2008 04:40 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Who knows something about SQL and PHP - by Exca on 01-05-2008 at 04:31 PM
RE: Who knows something about SQL and PHP - by NanaFreak on 01-05-2008 at 04:40 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 04:42 PM
RE: Who knows something about SQL and PHP - by NanaFreak on 01-05-2008 at 04:43 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 04:45 PM
RE: Who knows something about SQL and PHP - by NanaFreak on 01-05-2008 at 04:48 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 04:53 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 04:57 PM
RE: Who knows something about SQL and PHP - by NanaFreak on 01-05-2008 at 05:00 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 05:04 PM
RE: Who knows something about SQL and PHP - by surfichris on 01-05-2008 at 10:07 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 10:33 PM
RE: Who knows something about SQL and PHP - by Tochjo on 01-05-2008 at 10:35 PM
RE: Who knows something about SQL and PHP - by Exca on 01-05-2008 at 10:42 PM
RE: Who knows something about SQL and PHP - by surfichris on 01-06-2008 at 11:35 AM
RE: Who knows something about SQL and PHP - by Exca on 01-06-2008 at 12:43 PM
RE: Who knows something about SQL and PHP - by Volv on 01-09-2008 at 11:36 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