MySQL INSERT problem with server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eMPiko
Forum Newbie
Posts: 3
Joined: Tue Aug 12, 2008 9:56 am

MySQL INSERT problem with server

Post by eMPiko »

Hello,
I try webspell system, but I got some troubles. Some functions just does'nt work and it looks like my server got cycle. One of problematic scripts is there:

Code: Select all

if($_POST['save']) {
  include("_mysql.php");
    include("_settings.php");
    include("_functions.php");
 
    $date = time();
    $run=0;
 
    if($userID) {
      $name=getnickname($userID);
        $email=getemail($userID);
        $url=gethomepage($userID);
        $icq=geticq($userID);
        $run=1;
    }
    else {
    $name = $_POST['gbname'];
    $email = $_POST['gbemail'];
    $url = $_POST['gburl'];
    $icq = $_POST['icq'];
        $CAPCLASS = new Captcha;    
        if($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) $run=1;
    }
    
    if($run) {
        safe_query("INSERT INTO ".PREFIX."guestbook (date, name, email, hp, icq, ip, comment)
                        values('$date', '".$name."', '".$email."', '".$url."', '".$icq."', '$ip', '".$_POST['message']."')");
                        
    if($gb_info) {
 
            $ergebnis=safe_query("SELECT userID FROM ".PREFIX."user_groups WHERE feedback='1'");
            while($ds=mysql_fetch_array($ergebnis)) {
                $touser[]=$ds[userID];
            }
 
            $message = '[b]There is a new guestbook entry![/b] [url=index.php?site=guestbook#'.mysql_insert_id().']Click here[/url] ';
            foreach($touser as $id) {
            sendmessage($id,'New guestbook comment',$message);
        }
    }
    }
    header("Location: index.php?site=guestbook");
}
It doesn't work just on my server, which config file can change that?
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: MySQL INSERT problem with server

Post by ghurtado »

eMPiko wrote: It doesn't work just on my server, which config file can change that?
You gotta provide more information than that for people to be able to help you. What specific error message do you get?
eMPiko
Forum Newbie
Posts: 3
Joined: Tue Aug 12, 2008 9:56 am

Re: MySQL INSERT problem with server

Post by eMPiko »

It just doesn't work. No error just loading... In this script concretly, there are just new-opened blank window and whole site is crappy. Try it yourself on http://tmn.lupo.sk/empiko/ripteam user: eMPiko pwd: admin
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: MySQL INSERT problem with server

Post by ghurtado »

That website is blocked by my firewall. I am afraid I can't help you without more details.
eMPiko
Forum Newbie
Posts: 3
Joined: Tue Aug 12, 2008 9:56 am

Re: MySQL INSERT problem with server

Post by eMPiko »

I'm afraid that's all I can tell you, no error, no warning, nothing, just loading
Post Reply