Help PHP Question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi There,

I firstly wish to thank those who have helped me:) I have one issue that I  
sort of am lost in the dark, I have searched google without any luch,

I am passing the following through to a html link


How can I get the query to recognise that number as the WHERE clause  

Thanking you in advance.


Re: Help PHP Question

Using $_GET :


Then use $_GET['num'] to get the number 1001.



Then use $_SERVER['QUERY_STRING'] to get all the string after the ?
mark. In this case it will have the number 1001.

Re: Help PHP Question

Quoted text here. Click to load it

or you can use Apache's the mod_rewrite:

    RewriteEngine on
    Options +FollowSymlinks
    RewriteBase /
    RewriteRule ^result\.php\?([\d]+)$ /?num=$1

(if result.php is in site's root directory)

this should rewrite request result.php?1001 to result.php?num=1001
you can use even better view construction with mod_rewrite:
    RewriteRule ^result\/([\d]+)$ /result.php?num=$1

will rewrite to

Quoted text here. Click to load it

Exact Meta Search | Major Search Engine

Site Timeline