Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. It's because your missing the bracket parts when you use $portion. I don' know how your not getting a syntax error using commas for concating. <?php $filearray = file("ProductInfo.txt"); echo $filearray[2]."<BR>"; $portion = explode(":", $filearray[2]); echo $portion[1]."<BR><BR>"; ?>
  2. You set them up with your host. Usually you can set them up from the control panel, it all depends on what host you use. Some hosts don't even offer cron jobs, so check that first.
  3. To run a script every hour, you need to set up a cron job. You can completely take all that time() stuff out of your script. <?php $petfood= $rows[5] -2; mysql_query("UPDATE ownedpets SET food=$petfood WHERE id='$id'"); ?>
  4. Proboards - 100x100 Forum5 - 80x80 PHPfreaks - around 70x70 So it varies a little from place to place...but somewhere around those sizes.
  5. I don't think it will parse the BBcode between [.code][./code] tags. So no need to worry about that in the future Just to test... [b]test[/b]
  6. I will have to agree with 448191. I don't see why you would direct your site towards christians. I understand that anyone can get use out of it, but there isn't much of a point doing the whole christian thing.
  7. Beautiful design. Thats about all I have to say
  8. You use a database to keep track of whos is what, then you use PHP to control it. I would suggest you start learning instead of asking a bunch of questions right now, these questions will all become obvious once get far enough into PHP.
  9. www.tizag.com is a great place to start.
  10. Yeah...I think thats about as good as it's going to get considering the way you set it up.
  11. It's going to take a little more work then that since they are pulling this data from the DB. If they were manually putting the images into the HTML, then your way would work fine. The link I posted above will show exactly how to format it from results from the database.
  12. You definitely need to be using mysql_real_escape_string on it, as the person can type whatever they want into the URL. You should also make sure it is a numeric value.
  13. This is kinda a shot in the dark, but it might work. SELECT SUBSTRING_INDEX(name, ' ', -1) AS last FROM users ORDER BY last Where it says "name", that is where you put the field name where the first and last name is stored.
  14. You need to use pagination. There a plenty of tutorials out there for it. As for formatting them how you want, take a look at this post http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  15. In your query, you are selecting two field names named "id". You need to alias those fields so the query will know which one to use. So do something like this SELECT e.id AS employeeID, e.first_name, e.last_name, e.job_id, j.id AS jobID, j.title FROM employees e INNER JOIN jobs j ON (e.job_id = j.id) WHERE department_id = 4 ORDER BY last_name ASC Now when you want to use e.id, do this $r_emp['employeeID'] If you want to use j.id, do this $r_emp['jobID']
  16. <?php $row['foranimal'] = "jlfdsjfdragonlll"; if (strstr($row['foranimal'], 'dragon')) echo "Found"; else echo "Not Found"; ?>
  17. Are you sure your host supports PHP (if your using a host)? If you want to do it from your computer, you can download a package such as XAMPP or WAMP.
  18. They are using double quotes darkfreaks, it's not going to make a difference if they do it your way or not.
  19. Well, it's ultimately your choice. If it's not going to take tons of coding, then you probably shouldn't worry about using OOP. For a game like your doing, you could make it so you can use each function within the class work on both players. Without OOP, your going to have to have two separate parts of code for that. My choice would be to use OOP just because you are going to reuse each function more than once in your script, so it will greatly reduce the amount of code. Again, I'm no professional with OOP at all. So if you want to wait for a second opinion, that would probably be smart.
  20. If it's going to take a large amount of code, I would use OOP just because it makes it so easy to sort everything. I don't have much of anything intelligent to say as to why it's better to use OOP in this case. I just like using it when I'm programming something that could get confusing, and OOP takes all the confusion out. Thats just my two cents.
  21. Change this $result3=mysql_query($sql3); To $result3=mysql_query($sql3)or die(mysql_error()); Tell us what error you get.
  22. Could you tell us what didn't work about it? Also, show us your code (if you changed anything)
×
×
  • 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.