Help needed with php and mysql

I am such a beginner but I had gone this far…
Here is the code:

<?php $url = ""; // The simple url $name = "11215"; // this data coming from database $newUrl = $url . "$name"; // appending the new url header("location:$newUrl"); //the new url redirected exit; ?>

So I’d like to get a $name variable (zipcode) received from a database or any file.
Everytime the url/site refreshes the next or randomly picked zipcode should be the new variable for $name
and the one was just used should be deleted from the database. I guess it’s like an array…
I have a mysql database on my server set up which I have to connect to…help would be nice there too ;).
I am wondering if I could run the database from my local computer without connecting to any server.

Any help would be great!

Thank you guys…


the question is, what is the sence of that.

it the data u wanna be displayed already existing?

what happens if there are no zip’s left?

why the redirection?

it may be easyer to solve the problem in a diftent way. but without these infos i don’t know.

P.S.: i deleted the other topics.

since firefox got this new macro plug-in where u can automate motions in the browser I could recall this url with a new zipcode or stock code or whatever I need to show at refreshing.

if there are no more zip codes left the script should just stop and go back to the main url perhaps.

redirection - that’s the only thing I came up with for showing the new url…

definitely want to use firefox with this cool macro for automation.
what other solution is out there I don’t know…
OPEN for ideas!

Thank you for helping!

Sponsor our Newsletter | Privacy Policy | Terms of Service