affordit Posted February 18, 2009 Share Posted February 18, 2009 Can someone see what I am missing here? I just get a blank page ?? <?php session_start(); $id=$_POST['id']; $client_name=$_POST['client_name']; $psword=$_POST['psword']; $company_name=$_POST['company_name']; $project_id=$_POST['project_id']; $start_date=$_POST['start_date']; $project_duration=$_POST['project_duration']; $finish_date=$_POST['finish_date']; $temp_url=$_POST['temp_url']; include("teao_1_dbinfo2.inc"); $dbh=mysql_connect ("localhost","$conn_name", "$password") or die('Cannot connect to the database because:'.mysql_error()); mysql_select_db ("newsletter") or die(mysql_error(); $query = "Select * from projects Where id = '$id'"; $result = mysql_query($query) or die(mysql_error()."<br /><br />".$query); if (mysql_num_rows($result)<1) { echo "NO RECORD WITH THAT ID EXISTS."; exit(); } else { $rows = mysql_fetch_array($result,MYSQL_ASSOC); $update = "UPDATE `projects` SET `client_name`= '$client_name',`psword`= '$psword', `project_id`= '$project_id', `start_date`= '$start_date', `project_duration`= '$project_duration', `finish_date`= '$finish_date', `temp_url`= '$temp_url' WHERE `id`= $rows['id']"; mysql_query($update) or die(mysql_error(); } (header("location: http://mysite.com/1_projects/edit_projects_db.php")); ?> Thanks for looking Link to comment https://forums.phpfreaks.com/topic/145663-problemupdating-database/ Share on other sites More sharing options...
Cal Posted February 18, 2009 Share Posted February 18, 2009 theres nothing that would output anything in your script. Link to comment https://forums.phpfreaks.com/topic/145663-problemupdating-database/#findComment-764711 Share on other sites More sharing options...
samshel Posted February 18, 2009 Share Posted February 18, 2009 debug by echoing... i generally follow binaary tree approach echo in middle of php page. if you see echo problem is in second half, else in first half...divide problematic hald into 2, and repeat... ofcouse if you see points most likely to break, echo before that first happy debugging ! Link to comment https://forums.phpfreaks.com/topic/145663-problemupdating-database/#findComment-764712 Share on other sites More sharing options...
affordit Posted February 18, 2009 Author Share Posted February 18, 2009 Tryed the echo debug get nothing and if the script completes shoud go to another page. I think I have a syntax error but can't see it. Link to comment https://forums.phpfreaks.com/topic/145663-problemupdating-database/#findComment-764718 Share on other sites More sharing options...
samshel Posted February 18, 2009 Share Posted February 18, 2009 1) error_reporting(7);//at the top of page 2) add echo before include("teao_1_dbinfo2.inc");//possibility problem is with this file. 3) for now dont header anything, echo it out there too.. cant help further much buddy, sorry ! Link to comment https://forums.phpfreaks.com/topic/145663-problemupdating-database/#findComment-764728 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.