Jump to content

chocopi

Members
  • Posts

    551
  • Joined

  • Last visited

    Never

Everything posted by chocopi

  1. 'w' = Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. I think you must have missed this bit ~ Chocopi
  2. maybe you should look at THE MANUAL and look at what the "w" does ~ Chocopi
  3. <?php if(you want '123' and '456') { echo "Use $_GET"; } else if(you want something different) { echo "I did not understand the question"; } ?> do you mean you want to be able to get the 123 and 456 part, if so then use GET or i misunderstood. ~ Chocopi
  4. well seeing as it is between /* and */ that means it is a comment, and no you do not have to include it. I am guessing this if from open source code so this line just gives a bit of information about the file. So /* = start of comment $Id: = 'Id' as it is the id of the file abd i guess it has been declared like a variable for indexing ? gtk.php = file name v 1.41 = version of file 2002/04/11 02:19:50 = date and time created andrei = user who created the file Exp $ = ?? */ = end of comment I think thats roughly right, but dont take my word for it ~ Chocopi
  5. It happens twice by the way after both . "\n"
  6. a cron job will work when ever it is told to. If your server is down the cron job will not be able to work as the server is down. Its like a man can throw a ball at 5 oclock everyday, but if he is asleep at 5 he wont be able to throw it ~ Chocopi
  7. where is your $username and $password on your register page ?
  8. Im glad it worked But you should try and use Caesar's as its neater and generally better ~ Chocopi
  9. instead of using this Print "<td>".$var. " </td></tr>"; //here it is use Print "<td>".$date." </td></tr>"; //here it is as we have split $var into $date and $time and you want $date to be used That should sort it ~ Chocopi
  10. Oh sorry i didnt notice, sorry But my code should still work so try the changes from my previous post And hopefully it will be fine ~ Chocopi
  11. is it stored in the database at a DATETIME though so it looks like 00/00/0000 00:00:00 ??? If it is then you can use my code by <?php $var = $row['time']; list($date,$time) = explode(' ',$var); echo $date; ?> if not please tell me what it is stored as Hope it helps ~ Chocopi
  12. replace $db_table with the actual tablename, get rid of the curly braces and add an astrieks, so this line: $query = mysql_query("DELETE FROM $db_table WHERE email = '{$email}'"); looks like $query = mysql_query("DELETE * FROM tablename WHERE email='$email'"); if not replace $query = mysql_query("DELETE * FROM tablename WHERE email='$email'"); with $query = "DELETE * FROM tablename WHERE email='$email'"; mysql_query($query) or die(mysql_error()); Hope one of those works ~ Chocopi
  13. Can you post your code, please ? If your using DATETIME in MySQL then you can just explode the space and then you have your date and time separately Eg: <?php $var = "01/01/2001 12:12:12"; list($date,$time) = explode(' ',$var); echo $date; // should be 01/01/2001 ?> Hope that helps ~ Chocopi
  14. try this $sql = "SELECT * FROM `users` WHERE username='$username' AND password='$password'"; Hope it helps ~ Chocopi
  15. you would need $row['user_url'] and $row['user_name']; you need to remember the ' ~ Chocopi
  16. Thats what Chigley has posted The only thing you might have to change is list($username, $email) = explode(":", $content) to list($username, $email) = explode(" : ", $content) ~ Chocopi
  17. I think you need the % sign so you would have SELECT * FROM new WHERE field1 LIKE 'cep%'
  18. i dont think that is right seeing as image/pjpeg does not equal JPEG or jpeg <?php $text1 = "image/pjpeg"; $text2 = "JPEG"; $text3 = "jpeg"; if($text1 != $text2 or $text != $text3) { //redirect } else { // your stuff } ?>
  19. I guess that means code like this only works on your own server: <?php $lines = file('http://www.somesite.com/'); foreach ($lines as $line_num => $line) { echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n"; } ?>
  20. echo the chktype to see what its giving
  21. Cheers That works perfectly ~ Chocopi
  22. yea you can, but i just prefer being able to see whats going on step by step, especially as i had to keep swapping stuff around
  23. Well i think they could use stuff like SELECT FROM or DELETE FROM in my code i use this on submit <?php $original = $_POST['message']; $original = strip_tags($original); $original = htmlentities($original, ENT_QUOTES); ?> and then to get it back <?php $text = $_POST['original']; $text = mysql_real_escape_string($text); $text = stripslashes($text); ?> That might cause some problems, but it should be fine ~ Chocopi
  24. However, that will only stop html tags it wont stop the likes of mysql stuff
  25. use $_GET <?php $title = 1; // select statement echo "<a href=\"page.php?title=$title\">$title</a>"; ?> Then on page.php have: <?php $title = $_GET['title']; mysql_query("SELECT fieldname FROM tablename WHERE title='$title'"); ?> Or something like that ~ Chocopi
×
×
  • 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.