Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   PHP / mySQL (http://siteownersforums.com/forumdisplay.php?f=10)
-   -   How would I create a code for something like this? (http://siteownersforums.com/showthread.php?t=161667)

top200 11-29-2015 12:10 AM

How would I create a code for something like this?
 
I am familiar with php, but I've never worked on this, full time. I read like 4 good books, and I made some php modifications in Wordpress, but in general I work on other things. I would need to create a simple code, which would achieve something like this:

I want to create an age verification page for an xxx site, and this would be redirecting people to certain model pages, which look like this:

domain.com/model/sunny-leone-123.html or domain.com/model/kagney-linn-karter-2.html (these numbers are stored in a database, and go from 1 for the first model, to whatever number is the last one, currently I have around 1200 models there, so it is that)

This is a copy of what I posted somewhere else:

1) Starting ulrs will look something like this:

domain.com/e.php?m=sunny-leone (so I will need to store everything after the equal sign in a variable I would say, and obtain it with GET, most likely)

2) Then search for "sunny-leone" in the database, which looks like this:

prntscr.com/982yph

This is in table named "models" and column names are "name" and "record_num"

The url parameter is "sunny-leone", and the record in the database would be "Sunny Leone", so I would need to make sure I will convert that to the right format or search for it in a certain way.

After it finds "Sunny Leone", it needs to match it to the "record_num" and create a url like this:

domain.com/model/"name"-"record_num".htmlt would contain hyphens like "sunny-leone"

So if record number for "Sunny Leone" would be "123" the url would be looking like this:

domain.com/model/sunny-leone-123.html

3) And this needs to be connected to the Yes button, as a link. People will see "Are you 18 or older"? -> They will click yes, and it needs to go to this url.

I guess this is the best way to do it, get the model name from the entry page url, search for it in the database, construct the url from this, and make it work with the yes button.

This seems to be fairly easy, but it is kind of hard to figure out how to do it, since I don't work on php every day. If I could get some info, this would be a lot of help.

Thanks.


All times are GMT -7. The time now is 06:19 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.