Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Obviously you're still getting an error too, right? Or you wouldn't be posting. What does the query look like now? If it's the same, then you don't have id in your URL. Think it through.
  2. Aaaaand? Is there an id in your URL? You need to provide more information, and make some attempts to figure it out. When you add something, don't just immediately tell us you did it, keep trying for a bit using the advice we've given already.
  3. You're missing two things. Check how many parens and {} you have. if (!mysql_query($sql) die('Error: ' . mysql_error()); }
  4. Your error still doesn't seem to match, but regardless, you never defined $id before trying to use it. Add echo "<p>Error: " . mysql_error() . " SQL: $query</p>"; And see what the actual query looks like, once you've defined $id.
  5. You should be able to debug basic parse errors. I don't even see a paren on line 19 or near it though that would cause a parse error. Is this the actual file. What is on lines 18-20 of the file?
  6. My first thought was to just write differently - for example when I was in high school and my friends and I passed notes we did a simple letter rotation encryption, and after a few times it becomes super easy to do in your head. We also made up our own letters and words. It's not the most secure but it would stop most people from even bothering, and if they did bother it would take them longer and maybe by then you'd catch them doing it?
  7. You need to turn on error_reporting and set it to E_ALL. The code you have will generate plenty of errors. If you got them, you should post them with your code for the future. You have an integer and are trying to use it as an object. The proper syntax for this would be echo date('Y-m-d H:i:s', $date); If you are trying to use a DateTime object, you need to create that object, rather than trying to use the int you have.
  8. Also to answer the original question, add to your query " AND id != $id". You'll probably need to add parens. Also you had $tags in there three times? I also changed the syntax of the string concatenation. $rquery = "SELECT * FROM blog WHERE (Tags LIKE '%$tags%' OR Tags LIKE '%$title%' OR Tags LIKE '%$sub%') AND (id != $id)";
  9. I just wanted to point out that it doesn't matter if you use while() endwhile; or if you use while(){}, you can always exit PHP and do HTML rather than echo/escape. <?php $x=1; while($x<10){ ?> <p>A bunch of HTML here</p> <?php } ?> So yes, while() endwhile; and the other alternative syntaxes are certainly valid and useful, I don't think that you *need* to use it the way you think. I'm only mentioning this because your comment implies that you think you can't do this with the more common syntax, and you can indeed.
  10. That's a rather unprofessional way to phrase things especially for a job posting, and I would be wary of any company that would use language like that in a job posting. I'm with xyph, how do you run queries if they're not in the code? I'd love to see the job ad.
  11. Yes, you would have to rewrite everything. However, learning to use a template engine is a valuable skill, from personal experience I will say it is necessary if you are trying to make a career out of PHP programming.
  12. Can you explain how you expect it to look?
  13. I bet you can guess what I was up reading all night. (Only because the 9 month old is teething and wouldn't sleep unless I was holding him, I'm not that obsessed with this place. [Okay shut up I am.])
  14. I disagree, usually username validation happens while or after you type the username, and it's easy to do it that way rather than on a button. More automatic. I would also use jQuery over that tutorial as it is already cross browser friendly.
  15. Sounds like you'll want to set up a cron job.
  16. You don't want to use a timestamp for a birthdate. Anyone over the age of about 42 will not be able to use your site.
  17. Why are you trying to do this?
  18. Firstly, make sure you're coding with error_reporting on and set to E_ALL. The same way the rest of the form values are handled. You then create a string to hold all three values, and make the MySQL column be DATE type. You have to use AJAX, which combines Javascript and a server side script like PHP. Check out jQuery there are some good tutorials on doing this.
  19. People aren't going to do it for you, if you need someone to write code for you, you'll need to post in the freelancing forum. You need to post exactly what you tried, and how it didn't work. Post the relevant code in the code tags (# button). What you're describing is very simple, so it shouldn't take long to fix, once you give us the info, and make an attempt to do it on your own.
  20. For simplicity you could just do $start1 = "Rundenstart vor $commence Tagen"; , check out the pages I linked to.
  21. First of all, you have the same code over and over again - you need to either make it a function, or start using some arrays and loops. Secondly, I don't see any code in there that is attempting to create an image using PHP. What have you tried so far?
×
×
  • 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.