Jump to content

darkagn

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

About darkagn

  • Birthday 06/19/1975

Profile Information

  • Gender
    Male
  • Location
    Adelaide, Australia

darkagn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Let's assume you have created a select query and retrieved the results into an associative array called $row. Here is how you set the values to the text boxes: $id = $row["USER_ID"]; if($id < 0) $username = 'New User'; else $username = $row["USERNAME"]; echo "<input type='text' value=$id name='id' />"; echo "<input type='text' value=$username name='username' />"; and so on. Basically the value setting will allow you to initialise your text boxes (or any other input for that matter) to a value, and the name field is used to retrieve it after the form is posted like so: if(isset($_POST["submit"])) { $id = $_POST['id']; $username = $_POST['username']; // send the details to the database. }
  2. Also you can adjust your php.ini file to set your default timezone for your server. Search your config file for the date.timezone setting and change it like so: date.timezone = Australia/Sydney Reboot your web server, then forever after all date function calls will be in the Sydney timezone without the need to call the date_default_timezone_set function beforehand.
  3. If you call mysql_connect with the same parameters and the new_link parameter set to false, then the connection is reused, that is another reference to the same connection is returned. The only time you need to call mysql_close() is when you need to free up some memory for some other memory-intensive task. There is no need to call it if you are just going to open another connection, all connections are freed once the script finishes its execution.
×
×
  • 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.