- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 54 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Validation of Form data ** SOLVED ** [ ]
Author
Message
HSM
Lieutenant
Joined: Mar 10, 2005
Posts: 166
Posted:
Fri Dec 14, 2007 11:09 pm
The code snippet here is the admin function that 'should' take the data from the form and insert the fields inputed into the database.
Problem is, it does not do that. It gives no error, it simply returns a blank screen, when it should read back the server details that have just been written to the database.
Anyone know what I did wrong here??
v7.9 PHP-Nuke (patched) v5 PHP & MySQL
Code:
global $sid, $uid, $host, $port, $spasswd, $vpasswd, $sname, $vname, $auth, $modneedpw, $clientcount, $maxclients, $platform, $version, $lastquery, $homepage, $colbg1, $colbg2, $colbg3, $coltxt1, $coltxt2, $dbname;
if ($modneedpw=='Yes') {
$modneedpw='1';
} else {
$modneedpw='0';
}
$result = @mysql_db_query($dbname,"INSERT INTO ghq_jcsvt_server (sid, uid, host, port, spasswd, vpasswd, sname, vname, auth, modneedpw, clientcount, maxclients, platform, version, lastquery, homepage) VALUES ('$sid', '$uid', '$host', '$port', '$spasswd', '$vtpasswd', '$sname', '$vname', '$auth', '$modneedpw', '$clientcount', '$maxclients', '$platform', '$version', '$lastquery', '$homepage')");
$newindex=mysql_insert_id();
$address="admin.php?op=jcsvtserverdetail&evid=".$newindex;
Header("Location: $address");
Note: I did not post the entire function, just the core code has been posted.
_________________ ...everything that has a beginning, has a horrible hell like ending... Last edited by HSM on Wed Dec 19, 2007 10:33 am; edited 1 time in total
Evaders99
Site Admin
Joined: Aug 17, 2003
Posts: 12383
Posted:
Sat Dec 15, 2007 1:52 am
HSM
Lieutenant
Joined: Mar 10, 2005
Posts: 166
Posted:
Sat Dec 15, 2007 10:58 am
$display_errors = true; is set, although it does not display any errors. Matter of fact, that feature has never worked for me.
_________________ ...everything that has a beginning, has a horrible hell like ending...
Evaders99
Site Admin
Joined: Aug 17, 2003
Posts: 12383
Posted:
Sat Dec 15, 2007 2:21 pm
HSM
Lieutenant
Joined: Mar 10, 2005
Posts: 166
Posted:
Wed Dec 19, 2007 10:32 am
Thx for all, my coding partner solved this issue by implmenting a different set of queries to get things done.
Appreciate your time and effort.
_________________ ...everything that has a beginning, has a horrible hell like ending...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum