Jump to content

Bman900

Members
  • Posts

    184
  • Joined

  • Last visited

    Never

Everything posted by Bman900

  1. I like to add info from other controlers to my main index page which also has a different layout than the rest of the site. How do I even go about this and where do I specify a new layoout for that index page?
  2. I found it, I never included my variables for the original values. Wow am getting old or something...
  3. Sorry about that, I will do it like that next time. I went back and did what you told me and got: Array ( [titlecolor] => #00FF00 [headercolor] => #00FF00 [headerlinks] => #00FF00 [navbackround] => #00FF00 [navlinks] => #00FF00 [leftside] => #00FF00 [footercolor] => #00FF00 [footertext] => #00FF00 [sumbit] => Submit ) It looks like the error is with the update code, but everything matches up and it should give me an error if it doesnt. Any guesses?
  4. Here is my code: mysql_connect("$dbhost", "$dbusername", "$dbpassword") or die(mysql_error()); mysql_select_db("$databasename") or die(mysql_error()); $newtitlecolor = $_POST['titlecolor']; $newheadercolor = $_POST['headercolor']; $newheaderlink = $_POST['headerlinks']; $newnavcolor = $_POST['navbackround']; $newnavigationlink = $_POST['navlinks']; $newleftsidecolor = $_POST['leftside']; $newfootercolor = $_POST['footercolor']; $newfootertext = $_POST['footertext']; mysql_query("UPDATE style_options SET styleinput='$newheadercolor' WHERE styleinput='$headercolor' AND id = '1'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newnavcolor' WHERE styleinput='$navcolor' AND id = '2'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newleftsidecolor' WHERE styleinput='$leftsidecolor' AND id = '3'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newfootercolor' WHERE styleinput='$footercolor' AND id = '4'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newheaderlink' WHERE styleinput='$headerlink' AND id = '5'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newnavigationlink' WHERE styleinput='$navigationlink' AND id = '6'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newfootertext' WHERE styleinput='$footertext' AND id = '7'") or die(mysql_error()); mysql_query("UPDATE style_options SET styleinput='$newtitlecolor' WHERE styleinput='$titlecolor' AND id = '8'") or die(mysql_error()); echo "Update succesfull!<br />"; echo "<center>[<a href=\"editstyle.php\">Go BACK</a>]</center>"; The Update successful message comes trough but nothing really gets updated. Whats wrong here?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.