Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 11-29-2015, 12:10 AM   #1
top200
Registered User
 
Join Date: Mar 2014
Posts: 5
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.
top200 is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Host1Plus.com - Web Hosting -50% | VPS From Hosting $2 | Dedicated Servers From $55 Aurimas Post your ad here 2 07-07-2016 10:11 PM
Host1Plus.com | Quality International VPS Hosting with 24/7 Support from $0.75/mo Aurimas Post your ad here 0 08-13-2015 05:40 AM
Does cake have any plugins to create a QR code? noahwilson PHP / mySQL 0 06-07-2013 02:16 AM
attractive THANKGIVING offers with a coupon code KVChosting The Market 0 11-16-2012 06:21 AM
553 code - Could not create file mjvndhsb Hosting Discussion 0 09-21-2011 08:41 PM


All times are GMT -7. The time now is 06:49 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.