Multiple MySQL INSERT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi People

My real problem is that I dont know code. I can sort of edit it in a sloppy
more or less works fashion. Any help would be great.

This is the code Im having problems with:


//Example//

$id = 0 + $_GET["id"];
$md5 = $_GET["secret"];




$gig = 1;
$giveupload = $gig*1024*1024*1024;

$res = mysql_query("SELECT passhash, editsecret, status FROM users WHERE id
= $id");
$row = mysql_fetch_array($res);



$res = mysql_query("SELECT passhash, editsecret, status FROM users WHERE id
= $id");
$row = mysql_fetch_array($res);


mysql_query("UPDATE users SET status='confirmed', uploaded = $giveupload ");

//send pm to new user

{

        $msg = sqlesc("Hello and welcome to Cyber Drive In you have been
given a 1gb head start to help your ratio. .we are a strict but fair site
and our warning are based on the torrent ratio not the global just because
you have a good ratio dont mean you can hit and run if you do hit and run
your downloads maybe disabled even if your global ratio is fine..so enjoy
our free 1gb gift rules are seed what you take or for 72 hours..plz read the
rules and facts now you have joined our friendly community");
        $added = sqlesc(get_date_time());
        $subject = sqlesc("Welcome to Cyber Drive In");
        mysql_query("INSERT INTO messages (sender, receiver, subject, msg,
added) VALUES (0, $id, $subject, $msg, $added)");


        echo $SQL;
}


//end example//

This does confirm the user (without email , if you call it confirmed)
It does add 1gig to the new account.

However it dosent seem to want to insert into messages and by doing such
send a pm to the user defined in $id. I know this is very basic.... But a
friend of mine asked me to help him with his test site. Now I know a bit of
html and Im learning a bit of php as I go.... But the MySQL is like maertian
to me. :)

Sailor
-- 
View this message in context: http://www.nabble.com/Multiple-MySQL-INSERT-tp20786333p20786333.html
Sent from the PHP - General mailing list archive at Nabble.com.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux