Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Not sure if your looking for something like this but it was fun to create <?php $theStuff =array("Name" => "NewName", "Age" = > "15"); SetToDatabase($theStuff); function SetToDatabase($theValue) { $table = "Test"; //Get list of Fields $result = mysql_query("DESCRIBE `".$table."`"); $Data = array(); while ($row = mysql_fetch_array($result,MYSQL_NUM)) { if( isset($theValue[$row[0]]) ) { $Data[$row[0]] = $theValue[$row[0]]; }else{ $Data[$row[0]] = ""; //empty unset values } } //Insert // $Fields = array_keys($Data); // $TheSet = "(".implode(",",$Fields).")"; // $TheValue = "(".implode(",",$Data).")"; // $SQLq = "INSERT INTO $table $TheSet VALUES $TheValue;" //Update $UPDATE = "UPDATE $table SET "; foreach($Fields as $F => $V) { $UPDATE .= "`$F` = '$V'"; } $SQLq = $UPDATE." " //<-- Where Blar $result = mysql_query($SQLq ); } ?> it probably has a few bugs as its written from the top of myhead but .. yeah
  2. only via a system or eval command i guess
  3. you lost me but i think you mean this <?php foreach($letter_q as $l_q) { echo $l_q."<br>" } ?>
  4. Ouch but i kinda agree clown[NOR], they need work
  5. Hints in the name.. in a function you need to say what to return change <?php function vehicle_build_times($vehicle_base_build_time,$research_level) { if ($research_level >= 1) { $vehicle_build_time = $research_level * $vehicle_base_build_time; } else { $vehicle_build_time = $vehicle_base_build_time; } } return $vehicle_build_time; // <-----ADD THIS ?> i did the same thing when i started.. curse the VB syntax
  6. well as a guess you could try $newname = $_FILES['mailfile']['name'];
  7. you can use the one from here but your missing a file on the code below
  8. click the speach bubble or Click here to PM rxbanditboy1112 why not just post it Oh use the [ code] tags
  9. Yeah i know.. the thing that has p!ssed me off is 1 the password being sent 2nd... EDIT: i might create another inf.loop and wait for the mail then go nuts.
  10. I think it might be easier if we know "Why" you want to convert it to php5? error ?
  11. Have you echo'd the $query ? as its kinda hard to read without the code tags and with an unknown input but i can tell you this.. its not a IE bug
  12. You know i am sh cked that never occured to me!!!
  13. Double post.. not going to help you now
  14. And the problem... is ?
  15. well your $username = $_POST['username']; $password = $_POST['password']; need to be directly after the if(isset($_POST['submit'])) {
  16. erm.. the upload folder must be writeable!!! chmod 777 -R <folder>
  17. Advice: Do what thorpe as shown.. then when it works.. build into 1 file.. if you read back my first post was asking what your trying to do.. the logic need to be correct, build the system with 3 file and then put into 1 or spend a few weeks shooting in the dark..
  18. quick mod <?php if (isset($_POST['uname'] && isset($_POST['upass'])) { ?> to <?php if ( isset($_POST['uname']) && isset($_POST['upass']) ) { ?> missed the ) on the uname in edit.php
  19. increase max_execution_time and remember to restart apache
  20. BusinessName should be appearing can you please within the[ code] tags
  21. WITHIN the CODE TAGS please...
×
×
  • 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.