Hi! This is the problem I have: When trying to add information via php script to the sql database I only get empty (blank) rows inserted without information... Can you please tell what may be wrong? The mysql connection is fine.
it's an entire script... don't know which part to post... whatever i try to add to the db it will only add blank rows instead information
<? include "adminlogincheck.php"; $pass=base64_encode($adminpassword); $sql= "update admin set login='$adminid', pass='$pass', adminname='$adminname2', adminemail='$adminemail2',title='$title2',keyword='$keywords2',description='$description2', adsense='$adsense2'"; executeupdate($sql); $msg= "Details Updates"; session_register('msg'); header("Location: editinfo_frm.php "); exit; ?>
That seems do be doing an update, not an insert. Can you confirm it's not a file being included by this one? Jay
Yes, this is doing an update... but all updated fields are blank ones instead information. You are right.
I did this and I get the following errors: Warning: Cannot modify header information - headers already sent by Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Aside from those, you should get something like string (nn) "the query" Code (markup): Can you paste that line (it has the importance)? Jay
string(112) "update admin set login='', pass='', adminname='', adminemail='',title='',keyword='',description='', adsense=''" thank you
None of your variables are set, anything from $pass to $adsense2. What's the content of adminlogincheck.php, can you paste it? Jay
<?session_start(); if(!session_is_registered('loginid')) { $msg="You are not authorized to view this page"; session_register("msg"); header("Location: index.php "); exit; } require "../config.inc.php"; require "../functions.inc.php"; ?>