premiso
Members-
Posts
6,951 -
Joined
-
Last visited
-
Days Won
2
Everything posted by premiso
-
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.
-
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.
-
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.
-
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.
- 4 replies
-
- htaccess
- mod_rewrite
-
(and 3 more)
Tagged with:
-
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.
-
NW? Midwest more of it. I plan on doing like 2 hours at a time, changing or something similar, see how it goes.
-
Need Help With Php Code (Xml To Php Array For Use With Smarty)
premiso replied to MrDigital0's topic in PHP Coding Help
Another issue spotted is that this line: $smartyvalues["sr"] = $result; Should be: $smartyvalues["sr"][] = $result; -
Need Help With Php Code (Xml To Php Array For Use With Smarty)
premiso replied to MrDigital0's topic in PHP Coding Help
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. -
ls -alh == winning
-
I am with you there 110%.
-
I think it needs more wires.
-
Here is my workspace at home:
-
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; }
-
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.
-
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.
-
You guys have managers who do Cocaine as well...and here I thought I was the only one =\
-
Going to try and pick up one of these: http://www.ergodirect.com/product_info.php?products_id=16574 See what my works says
-
You ever had sex standing up?
-
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?
-
I like KMPlayer, recently discovered it and yea, it is nice
-
I think I just peed in my pants a little! Thank you.
-
No New Post When Adding A Reply.
premiso replied to floridaflatlander's topic in PHPFreaks.com Website Feedback
I think they are looking into it, but I cannot be sure. -
Regex For A Specific Email Address "@shrewsbury.ac.uk"
premiso replied to jbonnett's topic in Regex Help
<?php $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@shrewsbury.ac.uk$"; Ok. -
Regex For A Specific Email Address "@shrewsbury.ac.uk"
premiso replied to jbonnett's topic in Regex Help
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!'; }