
July 19th, 2007, 10:31 AM
|
| Administrator
Join Date: Jun 2007
Posts: 3,709
BRL$: 42,925.75 Thanks: 0
Thanked 14 Times in 10 Posts
Rep Power: 409 | | Having problems. Hi, I'm having problems with this part of one of my scripts. It doesn't update the table and it doesn't redirect to the page I'm telling it to. No errors.PHP:---------if (!empty($_GET['action'])) { // set the $action variable $action = $_GET['action']; /////////////////////////////////// // Global Settings Section // /////////////////////////////////// if ($action == 'global') { // Get the current settings from the database $query = "SELECT * FROM settings_global WHERE id = '1'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); // If information is submitted update the database // and redirect to the main page. if (!empty($_POST)) { // Set new variables $url = $_POST['root_address']; $email = $_POST['admin_email']; $status = $_POST['website_on']; $query = "UPDATE settings_global SET url='$url', email='$email' status='$status' WHERE id='$id' LIMIT 1"; $result = mysql_query($query); echo 'ITS WORKING'; header('location: ' . $oldurl); } // Set the variables for current settings $oldurl = $row['url']; $oldemail = $row['email']; $oldstatus = $row['status']; // Print the form for editing options. echo 'Global Settings
Root Address:
Admin Email:
Website Status (On/Off): '; if ($oldstatus == '1') { echo '
'; } else { echo '
'; } echo ' '; }}--------- To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. | |
__________________ █ High Quality To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ Powerful To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. █ Jobs In !!! - Post Jobs, Hire Employees, Create Blogs and
Earn Money. | | | |