Jump to content

tauchai83

Members
  • Posts

    243
  • Joined

  • Last visited

    Never

Everything posted by tauchai83

  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?
  16. <?php $query = "SELECT user_id, first_name FROM users WHERE user_name='$un' AND password=('$p')"; //remove () ?>
  17. could you please post your DB design? all the fields...and possibly post the whole code doesn't work.
  18. I din see anything wrong. But you may try the one posted by mmarif4u 1st.
  19. the way you ask make me not really want to help you although i know it. I want full instructor--> like an order rather than ask for help. rubbish.
  20. LOL...can't you see learning is a on-going process for we all?
  21. it is up to you. For me, i will us one table. If your application is small, then you can have many table as you like. When the application is big, normally i try to reduce the number of tables. It doesn't mean i ignore the NORMALIZATION process. It is up to you.
  22. It seem to be a lot. But that's your job. You already accept it to do? If in my country, it will cost around RM 2K-3K (Ringgit Malaysia). Not dollar or pound. Not sure about that.
  23. it doesn't matter use what kind of programming language. It is the matter how creative and the logic behind. Eveything is depend on your practice. I suggest you learn online tutorial and also through php manual which can be downloaded for free. for start, you could search for login script and see how people code it using PHP. when you find some functions that you don't understand, you refer to php manual. I can assure you php manual is what you need. thanks.
  24. i'm not sure about odbc. but the following: $Stored_Password=odbc_result($Password_Confirmation,"Password"); the password here is a variable? if yes, should be $Password
  25. <?php if (isset($_POST['submit'])) { include('config.php'); $query = "SELECT * FROM `users` WHERE username='".$_POST["username"]."' AND password='".md5($_POST["password"])."' LIMIT 1"; $result=mysql_query($query) or die(mysql_error()); if (mysql_num_rows($result) < 1) { die("You have entered an invalid username or password."); } else { echo 'it worked'; } } ?> try this out. cheerss
×
×
  • 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.