After reading through Eli's blog, I decided to give the database site building a shot. I've gotten some good help from you guys so far, and I appreciate it. This is my first crack at anything that wasn't straight html, so it was pretty rough going.
Anyway, I finally got the site up at Online Job Service: Search and find a local job now!
I'd appreciate any feedback that you might have to make it better. I know it needs a search, and I'm working on it. I can't seem to get string comparisons to work right in php, but I'll figure it out eventually.
One problem I know I have is the site is open to SQL injection. Here is the htaccess file I'm using:
There are a couple places where it'll take in any characters. I know there is a way to filter them out in php, but I don't know what it is. Also, with that file, if someone were to type in Online Job Service: Find a local job in douche it would browse the state "douche" and ask you to select a city. It's not a huge deal, but I'd like to somehow stop that from happening, maybe by comparing $state to the list of unique states in the database and redirecting to the home page if that state doesn't exist. Anyone know how I might go about doing that?
Thanks for your help, you guys have been awesome.
Anyway, I finally got the site up at Online Job Service: Search and find a local job now!
I'd appreciate any feedback that you might have to make it better. I know it needs a search, and I'm working on it. I can't seem to get string comparisons to work right in php, but I'll figure it out eventually.
One problem I know I have is the site is open to SQL injection. Here is the htaccess file I'm using:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^alljobs/([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/([0-9]+)/?$ index.php?alljobs=1&state=$1&city=$2&zip=$3&spage=$4 [L]
RewriteRule ^alljobs/([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/?$ index.php?alljobs=1&state=$1&city=$2&zip=$3 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/([^/]+)/([0-9]+)/?$ index.php?state=$1&city=$2&zip=$3&job=$4&spage=$5 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/([0-9]+)/?$ index.php?state=$1&city=$2&zip=$3&page=$4 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/([^/]+)/?$ index.php?state=$1&city=$2&zip=$3&job=$4 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/([0-9]+)/?$ index.php?state=$1&city=$2&zip=$3 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/([A-Za-z\ A-Za-z]+)/?$ index.php?state=$1&city=$2 [L]
RewriteRule ^([A-Za-z\ A-Za-z]+)/?$ index.php?state=$1 [L]
Thanks for your help, you guys have been awesome.