Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You cannot write to file on a client PC using Javascript.
  2. Don't you already have it in $other_form ? What format exactly do you want the data in?
  3. Just my opinion here and it might be a bit of overkill but I would be using Analytics on your site anyway. With Analytics configured you could then use the provided API to display a counter if you want.
  4. A construct start with __ not _
  5. Have you tried Google? This board is for help with existing code.
  6. As pointed out by DavidAM, we have a tutorials section. If you fancy writing a tutorial you could, then just submit it to an Admin. Of course there is no guarantee it would be promoted onto the site. The problem with having a free for all tutorial section is that allot of people don't know what they are talking about, even if they themselves are confident that they are.
  7. Cron has nothing to do with though you can use it to execute php script. Cron is simply a scheduler for Linux designed to execute commands at a specific time. Those commands could be set to execute PHP scripts, shell scripts, whatever. .bat files are a type of script used on windows.
  8. Told you you where over complicating things
  9. Ah, that makes more sense. /usr/bin/mysql -u username -ppassword -e 'DELETE FROM thatsact_sadadmins.sm_admins WHERE DonationDate < DATE_SUB(NOW(), INTERVAL 1 MONTH)' databasename Note the query is being passed to the -e option and now your database name goers on the end.
  10. That thread doesn't happen to be another of your does it?
  11. <?php $dir = $_SERVER['DOCUMENT_ROOT']."/htdocs/pics/"; $files = glob("$dir{*.jpg,*.jpeg,*.gif}", GLOB_BRACE); if (is_array($files)) { foreach ($files as $image) { $image = basename($image); echo "<a href='pics/$image' rel='nofollow'>$image</a>"; } }
  12. clean_string doesn't happen to look like this does it? http://www.phpfreaks.com/forums/php-coding-help/email-security-form
  13. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=325519.0
  14. Strings need to be surrounded by quotes within SQL queries.
  15. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=325508.0
  16. This topic has been moved to Linux. http://www.phpfreaks.com/forums/index.php?topic=325526.0
  17. Cron jobs are executed by your systems shell, therefore your Cron makes NO SENSE at all.
  18. What is your question? If I had to maintain a site made up of 150 static pages I would be seriously looking into CMS solutions or rolling my own.
  19. Your issue has nothing to do with Apache. Do you have a domain name registered and a DNS server you can use? You need to add your own static ip address as the A record. If you do not have a static ip address you will need to use a service such as http://dyndns.org
  20. Read the link I provided or quit trying to program.
  21. What you seem to be trying to achieve but using the completely wrong syntax for is variable variables. That would be achieved using.... $fieldarray = array('characterName','shortName','height','weight','hometown'); foreach ($fieldarray as $fieldlabel) { if (isset($row[$fieldlabel])) { ${$fieldlabel} = $row[$fieldlabel]; } } However, I would never recommend such a method as variable variables are slow. use an array instead. Besides, if you are retreiving more than a single record your logic is still floored because you will only ever get the last record available.
  22. <?php $dir = $_SERVER['DOCUMENT_ROOT']."/htdocs/pics/"; $files = glob("$dir{*.jpg,*.jpeg,*.gif}", GLOB_BRACE); if (is_array($files)) { foreach ($files as $image) { echo "<a href='pics/$image' rel='nofollow'>$image</a>"; } Your path within $dir doesn't look right to me, but this example should get you started.
  23. Indeed you can, see http://api.jquery.com/category/selectors/attribute-selectors/
×
×
  • 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.