It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

How can i use post code search on my website??

page: 1
0

log in

join
share:

posted on Dec, 30 2008 @ 07:23 AM
link   
browseusers.myspace.com...

I want to use it in the same context myspace uses it. IE to enter post code and then filter ur search to find people in your location.

How can i do it?

btw www.autotrader.com uses post code search as wll



Thanx for help in advance


[edit on 30-12-2008 by Freeman]



posted on Dec, 30 2008 @ 07:49 AM
link   
If you're using POST instead of GET then you'll need some sort of a server side scripting language to parse the POST variables. Personaly I prefer PHP for this but there are a whole host of different ways to accomplish this.

You can find a simple tutorial of how this works here:

PHP $_POST



posted on Dec, 30 2008 @ 08:50 AM
link   
I SEEMS to have found a good site that explains this:

www.acmultimedia.co.uk...

Only im unsure about few things. What did he mean by saying:

"Create your database table using these files and your ready to begin. "?

How do i do that?

And then where do i put this script:

"
?php

#Convert the post code to upper case and trim the variable
$postcode = strtoupper(trim($postcode));

#Remove any spaces
$postcode = str_replace(" ","",$postcode);

#Trim the last 3 characters off the end
$postcode_first = substr($postcode,0,strlen($postcode)-3);

?>

"

In HTML file or where?

As for that PHP post link im absolutely clueless whats inside



[edit on 30-12-2008 by Freeman]



posted on Dec, 30 2008 @ 09:18 AM
link   
Forget about the database stuff until you get a good grasp of how this works. Look at the example I linked too. It's much simpler.

PHP is a script that is processed by the server before it is seen by the user. The php server executes the code inside of the <?php code.... > area.

In this example you submit POST data to a page with the extension "php", not "html". This tells the server to process php script in the page first. Say you have a form on the previous page that has a text box called "name". When the user clicks "submit" the data entered in the "name" box is passed to the php page and we can read it in teh POST data. If your page has the code:


Welcome <?php echo $_POST["name"]; ?>.<br />

What the end user sees is a page that looks like:


Welcome dbates.<br />

The php server found the "?php" marker and processed the code inside this element. The php in this example uses the echo function to write data on the page. Think of php as a way to write html code on the fly.



new topics

top topics
 
0

log in

join