Jump to content

deved

Members
  • Posts

    50
  • Joined

  • Last visited

Previous Fields

  • Languages
    html, css, php/mysql

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Australia

deved's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. If you're talking about retrieving the data from a MySQL database you could use the 'ORDER BY' command.To redirect a user try placing <meta http-equiv="Refresh" content="5;url=http://www.newsite.com"> in the head section of your page.
  2. Managed to test your scripts and they worked for retrieving data (thanks), however couldn't enter PASSWORD() into the mysql.`user` table, without first entering as either md5 or sha1, then could use the UPDATE/SET commands to change to PASSWORD() encryption (also found the mysql server had to be restarted before the new password would work).
  3. I've called the function in MySQL Query Browser and it will return the result, however is there a way to make it work within PHP like the md5 & sha1 encryption methods? All I found on the php.net site was the latter two.
  4. I'm using the mysql.user table to authenticate users, and apparently it uses PASSWORD() as the encryption method.I can use PHP to insert users and passwords using either md5 or SHA1, but not the PASSWORD() method. Where it falls down is when authenticating a user it doesn't recognize the non-PASSWORD method, and therefore doesn't allow access.Does anyone know how to enable PHP to use the PASSWORD() encryption method, or can this encryption method be changed in MySQL to say md5 or sha1.Cheers
  5. deved

    Blank screen

    I couldn't get mysqli to work either until adding this line 'extension=php_mysqli.dll' below the 'extension=php_mysql.dll' line in the Dynamic Extensions section of the php.ini file, also making sure the semicolon was removed from the beginning.
  6. deved

    PHP5 on IIS6

    If you haven't given up entirely, there is another change you may need to make in your php.ini file under 'Dynamic Extensions', and that is to remove the semicolon; from the begining of the ;extension=php_mysql.dll line which apparently loads the extension automatically.The php_mysql.dll file goes into your c:\php5\ext folder and the libmysql.dll file goes into the c:\php5 folder.Well at least they've worked for me on the few occasions I've had to install both PHP & MySQL.
  7. deved

    Selecting Tables

    How do you set the value to hidden if value has already been used ie. <input type="text" name="name" value="$var">I'm also having trouble finding info on sessions. Could you tell me how far off the mark this is?Insert the <?php session_start(); ?> before the <html> tag (is this required on each page)?Insert$_SESSION['user'] = $user;$_SESSION['pass'] = $encrypted_pass;on the following page somewhere after the $_POST, $user & $encrypted_passSorry for all the questions, but I've tried a number of tutorials and they're a bit vague in this department.
  8. deved

    Selecting Tables

    Would it then be possible to send the result of echo $row['job'] to another page using $_POST without using fields in a form? If that makes any sense.
  9. deved

    Selecting Tables

    Problem sorted. Ended up running a more specific query that matched information from both tables.It would be useful however, if information retrieved and echoed, such as the "echo $row['job']; line, could then be used in another query, as in the line $result = mysql_query("SELECT * FROM {$tbl} WHERE Job='job'");. I'm sure there's a way and with more experience will probably be able to work it out.Thanks for all your help to now tho. while($row = mysql_fetch_array($result)){echo "<h3>Job Number</h3>";echo $row['job'];}$result = mysql_query("SELECT * FROM {$tbl} WHERE Job='job'");while($row = mysql_fetch_array($result)){echo $row['data'];
  10. deved

    Selecting Tables

    I checked and there is data in the field.I also entered a lineecho "DATA";aboveecho $row['data'];which didn't show upIn the 2nd $result line I've tried linking Job='job' to the line echo $row['job']; could this be the cause?Could the result at line echo $row['job']; be turned into a variable, which can then be used in the 2nd query?Have just tested and its definately the link between Job='job' and echo $row['job']; by removing the WHERE function, and all the data including heading DATA showed.
  11. deved

    Selecting Tables

    if($radioresult == "something"){ $table = "table1a"; $tbl = "table1b";} Can u tell me why this doesn't work (I only get the result from the first query). <?php$con = mysql_connect("localhost","name","password");if (!$con) {die('Could not connect: ' . mysql_error());}mysql_select_db("dBase", $con);$acc = $_POST['acc'];$radio = $_POST['area'];if ($radio == "input1"){$table = "table1a"; $tbl = "table1b";}else if ($radio == "input2"){$table = "table2a"; $tbl = "table2b";}$result = mysql_query("SELECT * FROM {$table} WHERE account='$acc'");while($row = mysql_fetch_array($result)) { echo "<h3>Job Number</h3>"; echo $row['job']; } $result = mysql_query("SELECT * FROM {$tbl} WHERE Job='job'");while($row = mysql_fetch_array($result)) { echo $row['data']; }?>
  12. Have entered a close friend (helgetta), who would love to date you (not sure if she fits your criteria tho).
  13. deved

    Selecting Tables

    Can 2 tables be specified from the 1 result such as: if($radioresult == "something"){ $table = "table1a" && $tbl = "table1b";}else if($radioresult == "something else"){ $table = "table2a" && $tbl = "table2b";} I'm trying to retrieve data from a row of one table by using data in a row from the second table. The link is a column in both tables that has identical data.
  14. You mention validating a form using PHP. Could you advise on how this is done, or point me in the right direction?
  15. deved

    Selecting Tables

    Thanks for that. Sorry aspnetguy, still a bit new to PHP and sometimes can't work out the code unless it hits me in the face. Cheers.
×
×
  • Create New...