Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Ok, so first up, try this query instead: mysql_query(" UPDATE Reactions SET AWESOME=AWESOME+1, Used_IPs='$Used_IPs' WHERE Link='$Link' ") or die (mysql_error()); This will be way better than fetching each item and incrementing it in PHP and way less code. Second up: $Reaction = mysql_real_escape_string(htmlspecialchars($_GET['Reaction'])); Why are you doing that to reaction and using it for a check? I do not even see you using $_GET['Reaction'] in a query. I can understand the specialchars, but that should only be applied when you are attempting to display reaction, not just whenever or just because.
  2. Do you have the PHP-GD library installed? Other than that you might have to use a 3rd party service to do it for you without the imagick library.
  3. Some times the mailqueue can be messed up. On this server, do you control the mail server? It returns TRUE because it was accepted by the mail system, whether it was sent out is upto the mail server. One thing to try is specify the "from" as from a valid email on the domain, or something like "no-reply@domain.com" and see if that helps.
  4. You will need to make a "slug" type field in your database and or have an array map of title -> id. To grab the title with htaccess: RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^directory/(.*)$ index.php?subj=$1 Then you will just either need to query for a slug and see if it is valid or check an array or something similar in your index file.
  5. Scraping the data to be utilized else other (non-personal) is illegal for anyone who cares. Do as Maq suggests and get an API setup and be legit. /me votes to close this ancient thread.
  6. NW? Midwest more of it. I plan on doing like 2 hours at a time, changing or something similar, see how it goes.
  7. Another issue spotted is that this line: $smartyvalues["sr"] = $result; Should be: $smartyvalues["sr"][] = $result;
  8. It looks like your smarty loop is the culprit: {foreach from=$sr item=sri} <tr> <td style="width:60px;white-space:nowrap;"> <a class="bold" href="servicerequest.php?id={$sri.id}">{$sri.id}</a> </td><td> <a class="bold" href="servicerequest.php?id={$sri.id}">{$sri.description}</a> </td><td> <span id="SRStatus_1000"></span>{$sri.status}</td><td>{$sri.assignedto} </td><td style="width:90px;white-space:nowrap;"> {$sri.createdate} </td> </tr> {/foreach} Give that a try and see how it goes.
  9. protected static function makeRequest($url) { echo "\nMaking request to:\n$url\n"; $result = file_get_contents($url);//'wget -bq -o /dev/null $url >/dev/null 2>&1'; return $result; }
  10. It should show up under phpfinfo. The only thing I can think of is that your CLI script is using a different ini file. If you were on Linux, I could show you a command how to tell easily, but since you are not, open up the command prompt and run: php -r 'phpfinfo();' And it should spit out a ton of stuff in text, look for the .ini line and make sure that is the .ini you are changing.
  11. file_get_contents works if fopen_wrappers is on. But, to enable Curl in WAMP, you sometimes have to edit the php.ini and uncomment the extension line to the php_curl.dll and then save.
  12. You guys have managers who do Cocaine as well...and here I thought I was the only one =\
  13. Going to try and pick up one of these: http://www.ergodirect.com/product_info.php?products_id=16574 See what my works says
  14. I stand up occasionally at home, namely at the counter, I can do it for like 30-60 minutes or so then a bit of a back ache. But I might try standing up at work, maybe it will help with my fatigue. Will have to figure out how to rig it up first though ... Would that make me a "Stand up" guy?
  15. I like KMPlayer, recently discovered it and yea, it is nice
  16. I think I just peed in my pants a little! Thank you.
  17. I think they are looking into it, but I cannot be sure.
  18. <?php $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@shrewsbury.ac.uk$"; Ok.
  19. I don't think you would want to use regex in the way you intended, since we know what the domain portion needs to be let's match that exactly. So I would check that the string ends in the @shrewbury.ac.uk and then use the built in email filter, filter_var to make sure the email is valid. <?php if (preg_match('#.*@shrewsbury.ac.uk$#i', $email) && filter_var($email, FILTER_VALIDATE_EMAIL) !== false) { echo 'Valid email, yay!'; }else { echo 'Invalid email boo!'; }
×
×
  • 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.