Jump to content

dcro2

Members
  • Posts

    489
  • Joined

  • Last visited

    Never

About dcro2

  • Birthday 03/21/1992

Profile Information

  • Gender
    Male

dcro2's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It seems a little strange that you would use the same SQL result for both echoing user info and then looping through ratings. What does the information in this table look like? Is there really more than one row where usr=$member?
  2. Let me google that for you, and that.
  3. 'f_name' is still part of the $row array even if you use it like that, so this would work: $results[$row['f_name']] = $row['user_id'];
  4. And you can get how much free space you have with disk_free_space.
  5. There's probably a more intuitive way but whatever. foreach($test as $name => $arr) { $tmp = array_shift($arr); //get first element of $test[$name], which is always $test[$name]['0'] in your example sort($tmp); $result[$name] = $tmp[0]; } print_r($result); Array ( [abcd] => 10 [efgh] => 3 )
  6. Then start commenting things out until it works. Change those short open tags (<?) to <?php to start.
  7. error_reporting(0); ini_set('display_errors', 1); Put it at the top and try again.
  8. It probably has nothing to do with the version, but with their settings. Like if short_open_tag is enabled for instance.
  9. Couldn't you just make a column `confirmed` you could set to 1 instead of having two tables? That's more like what this forum does.
  10. Have you tried running the query directly on the server, with phpmyadmin for example? SELECT * FROM usr_test WHERE usr = 'username' AND pass = MD5('password') Have you done any debugging to find out if the username and password are what you expect at the end? Have you checked for any mysql_errors if the query fails in your PHP script?
  11. You were supposed to put in your own table and column names there, I don't know what they are...
  12. No, you have to put it outside the function. Just make a new line before the end tag (?>) and insert it there.
  13. I just realized what's going on with the two selects on that page haha. Let's say we were going to insert these values into the database. You would store all the values in variables and then insert it into the query which inserts a row in the database. The fields in your first code don't match up here so I'm making this up. This goes in submit_add_tenant.php: $forename = mysql_real_escape_string($_POST['tenForename']); $surname = mysql_real_escape_string($_POST['tenSurname']); $tenSuitablePostcodes = mysql_real_escape_string(implode(',', $_POST['tenSuitablePostcodes'])); $sql = "INSERT INTO table (`tenForename`, `tenSurname`, `tenSuitablePostcodes`) VALUES ('$forename', '$surname', '$tenSuitablePostcodes')"; $res = mysql_query($sql); Your second select would need to be renamed into <select id="box2View" multiple="multiple" size="3" name="tenSuitablePostcodes[]">
  14. A simple way could be to add if(!empty($_GET['p']) && !empty($menu[$_GET['p']])) $title = $menu[$_GET['p']]; anywhere before the title gets echoed, like at the bottom of menu.php.
×
×
  • 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.