Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by ldougherty

  1. just remove the .com aspect then, the ([^/]+) states to include anything as $1 and then outputs it on the other side.
  2. I don't see anything in your code that would send the message two times. Are you sure the code itself is sending twice and that the recipients email address does not have some type of forwarder or something?
  3. Set the left and right class to a particular pixel or percentage? I know you can set the div to be the entire page height just by saying height:100%
  4. indeed. http://us3.php.net/manual/en/language.operators.comparison.php $a != $b Not equal TRUE if $a is not equal to $b. $a <> $b Not equal TRUE if $a is not equal to $b.
  5. Try this.. Options +FollowSymlinks RewriteEngine on RewriteRule ^/([^/]+).com /result.php?section=$1 [NC] There is some real good information in http://corz.org/serv/tricks/htaccess2.php
  6. or you could use substr $month = substr("$dateofbirth", 0, 2); $day = substr("$dateofbirth", 3, 2); $year = substr("$dateofbirth", 6, 4);
  7. That would be an if statement comparing the values of $i and $eu stating if $i and $eu are not the same to do something which would be executed where you see //stuff http://us.php.net/manual/en/control-structures.if.php
  8. change $sql = "UPDATE users SET tokens=(tokens+$t) WHERE id=$id" to mysql_query("UPDATE users SET tokens=(tokens+$t) WHERE id=$id");
  9. Your code does no checking to see if the image actually exists before displaying the previous/next buttons which is why you can navigate to images that don't exist. Try putting in something that checks to see if the value being processed falls within the index range before showing the navigation buttons.
  10. Indeed; should be file_exists http://us3.php.net/file_exists buy even beyond that the logic doesn't add up. (file_exist($file)) { } else { echo "<img src=\"$file\"> } You are essentially saying if the file exists do nothing, if the file does not exist then show the image which is the file which apparently doesn't exist?
  11. assuming your input box sends the value of $query $swearwords = array("swearword", "badword", "anotherswearword", "anotherbadword"); if (in_array($query,$swearwords)) { echo "No swearing"; }
  12. sorry, i meant to say include_path, not include_dir
  13. I believe you can specify the character set that the user can input into the form using charset http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset http://htmlhelp.com/reference/html40/values.html#charsets The other half would be in setting the charset on the mailer script itself.
  14. Instead of using ../ try using the full path to the file. If that still doesn't work then add the path in your include_dir setting in the php.ini
  15. http://us2.php.net/manual/en/function.mysql-fetch-row.php You can use mysql_fetch_row to return a single row instead of an array. This is a good way to pull out individual values from the database. The other option would be to use mysql_fetch_array and then reference the array object. For example assume you return 10 items in the array and you want item 2 and 3 you would reference them as $name[2] and $name[3]
  16. catchalls are a bad idea, they are basically a trash can for spammers to send to. With that being said if I understand your correctly you want to update a database when an email is received. This could possibly be accomplished depending on the mail program that is receiving the message, how mail is being checked etc etc. If you were to write your own custom PHP script that acts as a web based mail client (difficult) you could add a call to make that database update but I don't see how it could be done using a pop3 client like Outlook.
  17. If you assign the variable inside the while loop you can use it anywhere on the page inside the PHP tags, or inside HTML by opening the php tag as <? echo $name ?>
  18. I'm not sure I understand your question but here is an example of how you would loop through the results of a query. $result=mysql_query("SELECT * FROM mytable"); while ($row = mysql_fetch_array($result)) { $name = $row[name]; $email = $row; echo "name is $name and email is $email<br>"; } This assumes you have fields for name and email and would assign a value and output each through the loop until it reaches the end of the database.
  19. The from field on the received message will look like whatever they input on the form itself, ie if I say Larry when you receive it the from field will say Larry. Are you saying they enter it appropriately but the form is turning it to gibberish?
  20. I've found this code on another site and it works. <?php $i = 0; if ($handle = opendir('./')) { //specify path in opendir while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && !is_dir($file)) { $files[$i] = strtotime(date ("M d Y H:i:s", filemtime($file)))." $file"; $i++; } } closedir($handle); } //sorts from increasing(date) use arsort for decreasing(year) sort($files,SORT_NUMERIC); $i=0; foreach ($files as $index => $value) { $modified[$i] = substr($value,11)." was last modified: ".date ("F d Y H:i:s",substr($value,0,20)); $i++; } //prints result as array foreach ($modified as $val) { echo "$val<br>"; } ?>
  21. Do you mean it is a password protected folder? If so you can pass the information via URL such as http://login:password@siteaddress.com/folder/file
  22. I believe this is because you have not compiled Free Type with GD. The following link should assist you in configuring this. http://www.searchmasters.co.nz/articles/84/cpanel-freetype2-installation/
  23. The fact that the time is good now does not mean the time was good when your script executed previously. A lot of Linux servers run cron scripts to keep the date/time up to date. It is most likely that your server time was off when the script ran but there is no way to know for sure.
  24. You should change your images to use full paths rather than relative paths, this is the only way for them to display properly with the rewrite rule in place.
  25. Hello, This is your PHP memory as defined in your php.ini as memory_limit You will need to adjust this value to something larger if you wish to read this text file.
×
×
  • 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.