Jump to content

barry6628

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

barry6628's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry yet again Ill let you have all the page. <?php session_start(); ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <body> <?php $check_name = $_POST['userName']; $check_password = $_POST['password']; echo "$check_name"; echo "$check_password"; mysql_connect("xxxxxxxxxxxx","xxxxxxxxxxxx","xxxxxxxxx") or die("Could not connect to MySQL server!"); mysql_select_db("xxx") or die("Could not select database!"); echo "selected db"or die("Could not select database!"); $result = mysql_query("SELECT * FROM accounts WHERE fname = '$check_name' AND password = '$check_password' ") or die(mysql_error()); $affected_rows = mysql_num_rows($result); if($affected_rows == 1){ header("Location: index.php"); } else { print 'Not Validated'; } /*if($affected_rows == 1){ print 'Validated'; } else { print 'Not Validated'; } */ ?> </body> </html>
  2. Thanks Sorry I forgot to add I dont want the user to have to ineract ie: press anothe buton.
  3. Hi This will be easy for you ? I have a validation form after input from the customer $affected_rows = mysql_num_rows($result); if($affected_rows == 1){ print 'Validated'; } else { print 'Not Validated'; } Instead of printing Validate I want the code to go directly back to the index.php How do I do it. Regards, and thanks Barry
  4. After displaying a list of records from mysql database how can I select one record from the display? The link will only take me to the next page I have tried adding a link to the url but that always ends up with the last number in the grid. Book Name Auther ISBN Price Postage Condition Catogery Add to Kart Voice of an Angle1 Brown 0316854301 £1.00 £2.00 a Novel Link 0 Voice of an Angle2 Brown 0316854301 £1.00 £2.00 a Novel Link 1 Voice of an Angle3 Brown 0316854301 £1.00 £2.00 a Novel Link 2 Voice of an Angle7 Brown 0316854301 £1.00 £2.00 a Novel Link 3 Voice of an Angle8 Brown 0316854301 £1.00 £2.00 a Novel Link 4 Voice of an Angle1 Voice of an Angle2Done Regards Barry
  5. Hi all Im building an on line book store Im having a problem after a customer selects a category fro a drop down menu and a list is populated. Now how can I get a customer to select from this list (output from the data base) and put it into a shopping cart? Regards, Barry
  6. barry6628

    CLI

    Hi After so many problems i gave up and loaded easyPHP all ok but I cant seem to get acces to the database via a normal cli I cd to the correct location ie C:\easyphp\mysql get the mysql> type SHOW DATABASES; and its not recognised. Any Ideas I know I should have kept tring but I couldent get phpmyadmin to work
  7. Hi I had a full woring PHP MYSQL PHPMYADMIN had to format my hard drive. Ive reinstalled everything now PHP works MySQL at command line works and Apache works but MYQSL is not showing in php info and I cant get phpmyadmin to work> HELP
  8. H i I'm using Windows XP Pofesional and I followed the steps from the book Begining PHP and MySQL 5. The instalation of Apache seems fine I put http://localhost in the browser and get the Apach screen as expected. Installed PHP5 as I did on my PC type in http://localhost/test.php and only get the page can't be displayed. Regads Barry
  9. Hi I have a base unit running PHP Apache and MYSQL all woking fine. The question is can I do the same on a laptop? if so why do I always get page can't be found when I try and run my phpinfo code from a file saved in htdoc with a php extension. Regards Barrry
  10. Hi tanks for all your help Ive don it. It was a ; after C\php in the environmental variable. Regards Barry
  11. Hi Thanks but no such luck I turned tha off restarted Apache and still the same. Please dont give up on me I do need this. Im loading a laptop see if that will work and then find the difference. Regards Barry
  12. Hi I dont think you got my last reply I attached my php.ini so ill send it again just imn case. Regards Barry [attachment deleted by admin]
  13. Hi any idea what could be causing this problem Regards Barry
  14. Hi again Hope you have a good day. I dont think im in safe mode ; ; Safe Mode ; safe_mode = off Thats from my php.ini Regards and thanks again for your patients . Barry
  15. Hi I was realy hopping that was the answer but I did as you said and there is no change. I dont know if this is relervent but when I do a search on my system for php.ini I get 2 one in c:\ windows and one in C:\php5. I did try taking the one out of Windows and things are still the same. Regards Barry
×
×
  • 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.