Jump to content

skali

Members
  • Posts

    221
  • Joined

  • Last visited

    Never

Everything posted by skali

  1. Seems like you have error in your SQL that you are using in $Sql. check it out.
  2. Yes, It can be done since PHP is a server side language and javascript is client side language. You can use conditions etc in your php code that will be reflected on the client side during js execution.
  3. or you can use mailenable http://www.mailenable.com/download.asp
  4. remove @ from the front of queries, try running the query from mysql client to see if the query is running fine.
  5. There are various clients available that you can use with mysql. To name a few 1- mysqlyog 2- navicat 3- phpmyadmin
  6. Notice: Undefined index, this notice appears when you are trying to access an index in an array that does not exists Use this: $query = "SELECT LEFT(content,100) as content, title, date, id FROM news WHERE content LIKE '%".$variable."%' or title LIKE '%".$variable."%' ORDER BY title";
  7. Are you using session_start() on B? If yes, are you saving your $_POST data into $_SESSION that can be used on C? You need to session_start() on every page where you want to access session data.
  8. For that you will need to create multiple language files and store language specific words in these files. You will also need to replace all the inline english words with replacement variables from these language files. For the translation: You can use http://babelfish.altavista.com http://translate.google.com
  9. try changing the from address and give some proper subject.
  10. Seems like this is an object serialized into string through serialize() function, you can use: $var = unserialize('your serialized string') to get the actual object.
  11. you should filter the $_GET variables on the server and check in the database for the existence of the user before further processing.
  12. UPDATE logon SET username='schmultz',password='math',firstname='John',lastname='Schmultzee',room='200' WHERE id = '1'
  13. In a string with single quote you cannot use variables inline: $str = '$abc this is abc'; //won't work $str = $abc.' this is abc'; // will work You will need to use string concatination to make this work, and when writing to database varchar, char, text types in db should be quoted with single quotes as described above.
  14. Don't use where clause in insert statement... Below is the syntax that can be used. INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name [(col_name,...)] VALUES ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] Or: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] Or: INSERT [LOW_PRIORITY | HIGH_PRIORITY] [iGNORE] [iNTO] tbl_name [(col_name,...)] SELECT ... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
  15. You should use another table with comment_id int not null primary key user_id int not null, comment text not null This way user_id will be the id of the user for whom the comment is being posted and any number of users can post comments to this user. Also if you want to keep track of which users left comments then you will have to introduce another field with id's of the users posting comment. Hope this will help.
  16. function shrink_str($str, $len){ $temp = substr($str,0,$len); $temp = $temp."....."; return $temp; } print shrink_str("abcdefghijklmnopqrstuvwxyz",10);
  17. Try printing the query and then run the printed query in mysql client or phpmyadmin, this will ensure that the php variables are getting populated properly.
  18. Use addslashes() funtion http://php.net/addslashes
  19. 1- You need to keep a field in your users table 2- when user logs into you website update this field with the timestamp of server at that moment 3- display this field where you want
  20. What are the errors/issues you are getting..
  21. You can fetch all the records from the queries in an array while($row=mysql_fetch_array($getPlayersRES)){//fetch all records in the array $records[count($records)] = $row; } now you can use this array anyway you like.
  22. The only suggestion probably will be to ask your host to recompile apache with freetype and freetype2....which is not such a huge issue.
  23. Hi, I have a system where my application is hosted. I have multiple websites on various servers, i am using curl to query the main application now my question is that is it possible to send sessions on any of my websites to the main application located on some server through curl. Basically is it possible to send php session variables through curl? Regards,
  24. 1- add a field in your database table named 'active' it can be a tinyint or enum 2- set its default value to 0, representing inactive 3- create an activation script that will change the value of this field to 1, meaning active 4- after registration send a link to users email address with some 'id' may be userid or username and this link will be to your activation script 5- once clicked the activation link will bring user to activation script that will validate user on the basis of the id and will activate his registration
  25. One issue that i see clearly is that you are not using "()" to join you "||" operators with your "&&" operator. Meaning according to your code file type must be image/pjpeg and its size must be < 2 mb only then this code will work, which you surely do not want. You also want image/gif files to be regarded by your code. Try if ( ( ($_FILES["picture"]["type"] == "image/gif") || ($_FILES["picture"]["type"] == "image/pjpeg") ) && ($_FILES["picture"]["size"] < 20000) )
×
×
  • 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.