Jump to content

tauchai83

Members
  • Posts

    243
  • Joined

  • Last visited

    Never

About tauchai83

  • Birthday 07/21/1983

Contact Methods

  • Website URL
    http://www.phpfreaks.com/forums

Profile Information

  • Gender
    Male
  • Location
    Kuala Lumpur, Malaysia

tauchai83's Achievements

Member

Member (2/5)

0

Reputation

  1. i guess the datetime you declare as the datatype should be 1st converted to safe date string 1st. Only Date
  2. For .NET, if you are in disconnected mode (meaning using local dataset, datatable etc), u nonit to use the connection string. Just declare the system.data namespace. if you want connect directly to db, make sure u include the connection string. i'm not sure what do you want, but at least this is how it works for .NET. You developing ur application using PHP or .NET?
  3. how about the session data? is it working now? I went through your code and so far couldn't find what's wrong. maybe the MD5 if (md5....) this make your coding not work.
  4. I doubt on how to create the following pattern: ************ *********** ********** ********* ******** ******* ****** ***** **** *** ** * thanks!
  5. ???? the title should change to intermediate addition and NOT simple addition. haha
  6. LOL. Storm The Gates, JAVA is powerful language. Nowadays most of company prefer .NET and JAVA technologies. How come you so "anti-JAVA"? The only thing is JAVA need higher processing power perhaps comparing to others.
  7. it could be a version problem. But you should contact the webserver admin to figure out the real cause.
  8. tauchai83

    Help

    you should post it straight away.
  9. create a field for user-> Last Visit (datetime) NOT NULL default:0000-00-00 00:00:00 then: <?php $sql1="SELECT Last_visit FROM user WHERE user_id='$userid'"; $result1=mysql_query($sql1); $row=mysql_fetch_assoc($result1); $last=$row['Last_visit']; $_SESSION['last']=$last; //use the session variable to hold the previous last visit date. $sql="UPDATE user SET Last_visit=NOW() WHERE user_id='$userid'"; //now only update it $result=mysql_query($sql); ?> it should work well for you. Regards, chai
  10. man, this is SYNTAX error. Try to check. what is ?=??
  11. hi, could you please post ALL your code that you had done?
  12. 1st of all, REMOVE WHILE loop.
  13. <?php $sql="SELECT A.first_name, A.last_name, B.hobby FROM people A, interest B WHERE condition....."; ?> you lack tutorial. You may use INNER JOIN as well.
  14. your problem is user id (auto increment( and username? which one do you compared? you try omit the auto increment since username already UNIQUE and could be set as primary key. try this: <?php if (empty($errors)) { // If everything's OK. $query = "SELECT user_name, first_name FROM users WHERE user_name='$un' AND password='$p'"; $result = mysql_query($query) or die(mysql_error()); // Run the query. $row = mysql_num_rows($result); // Return a record, if applicable ?> Before you try this, modify your DB design. Omit the auto increment user_id which in my opinion is redundant field.
  15. <?php // Check for a password. if (empty($_POST['password'])) { $errors[] = 'You forgot to enter your password.'; } else { $p = $_POST['password']; } if (empty($errors)) { // If everything's OK. $query = "SELECT user_id, first_name FROM users WHERE user_name='$un' AND password='$p'"; $result = mysql_query($query) or die(mysql_error()); // Run the query. $row = mysql_num_rows($result); // Return a record, if applicable ?> try this OK?
×
×
  • 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.