| | #1 |
| Warrior Member Join Date: 2011 Location: Jacksonville, FL
Posts: 18
Thanks: 12
Thanked 3 Times in 3 Posts
|
Hello, I have a webpage with a 3 fields webform inside. The user will have to fill in the form and to click the button "generate". The output will be the same page with some differrences based on his 3 inputs: - input#1 will generate a specific user URL, ex: ww.webpage.com/userID - input#2 will remplace a word in the webpage content - input#3 will remplace another word in the webpage content Thanks. |
| |
| | #2 | |
| Active Warrior War Room Member Join Date: 2012
Posts: 71
Thanks: 2
Thanked 13 Times in 13 Posts
|
You need to edit .htaccess so you site understands that "userID" is variable on url, else it will give 404 error. Send me your code and I can work something out | |
| | ||
| |
| | #3 | |
| Warrior Member Join Date: 2011 Location: Jacksonville, FL
Posts: 18
Thanks: 12
Thanked 3 Times in 3 Posts
|
Sorry, I meant I have the content for a webpage I plan to publish online. So, I haven’t the code yet because I am not a developer, I am just an internet marketing newbie, who is looking for some help to generate his first dollars through internet. I can insert and edit the content by myself once I have the said code. I can do it by using Kompozer for example. The content is just some text lines. The text will include 2 variables. And somewhere between the text lines there is a 3 fields form. The 3rd variable is for the end-user URL as I said. I will be very grateful if you can help me to have the basic structure of the said code where I will be able to add and edit my text lines. By the way, I have a domain name and hosting account at Hostgator. Thanks once more again, | |
| |
| | #4 |
| HyperActive Warrior Join Date: 2011
Posts: 106
Thanks: 3
Thanked 12 Times in 11 Posts
|
Seeing that you're hosting the site on hostgator, I'm going to assume that you're going to use PHP to complete the task. With this in mind I put together a brief example that should get you started.
|
|
Free AdPress Theme for WordPress .
| |
| |
| | #5 |
| Active Warrior War Room Member Join Date: 2012
Posts: 71
Thanks: 2
Thanked 13 Times in 13 Posts
|
Here is simple example I made for you. index.php get_data.php .htaccess DB Schema Hope this helps you to get started |
| | |
| |
| | #6 | |
| Warrior Member Join Date: 2011 Location: Jacksonville, FL
Posts: 18
Thanks: 12
Thanked 3 Times in 3 Posts
|
Now I have created a php page where I inserted the code you gave here, then I added some content. I also created MySql database to connect it to the said php page. But I don't know how. Can you please tell me how to connect my php page to my MySql database? Thanks once more again. | |
| |
| | #7 | |
| Warrior Member Join Date: 2011 Location: Jacksonville, FL
Posts: 18
Thanks: 12
Thanked 3 Times in 3 Posts
|
First, I appreciate the examples you have posted here. Thanks. But I don’t know how to use each one of them: which one will be my webpage? which one is the configuration file? etc.. And can you please give me an idea on how to connect the MySql database I have created to my webpage? Thank you very much. | |
| |
| | #8 | |
| digital carpenter War Room Member Join Date: 2013 Location: Pennsylvania
Posts: 1,306
Thanks: 480
Thanked 747 Times in 444 Posts
|
| |
| | ||
| |
| | #9 | ||
| Active Warrior War Room Member Join Date: 2012
Posts: 71
Thanks: 2
Thanked 13 Times in 13 Posts
|
![]()
Frontpages of websites is called "index". On index.php and get_data.php there is line $db = new PDO('mysql:host=127.0.0.1;dbname=mysql_table', 'mysql_user', 'mysql_pass'); Replace "mysql_table" with your database name, "mysql_user" with your mysql username and "mysql_pass" with password. Before that, go to phpmyadmin and select database you have created and go to sql tab and run whats in "db schema" link. Here is picture: http://i.imgur.com/SajM4C9.png But as brutecky said, its a bit hard to explain some things for non coders and Im sure that google gives some answers faster | ||
| | |||
| |
| | #10 | ||
| Warrior Member Join Date: 2011 Location: Jacksonville, FL
Posts: 18
Thanks: 12
Thanked 3 Times in 3 Posts
|
I followed all the steps here above, But when I tried to test the page by filling the form in and submitting it, I got 3 differents WARNING messages in once, see below:
Thanks. | ||
| |
| | #11 | |
| Active Warrior War Room Member Join Date: 2012
Posts: 71
Thanks: 2
Thanked 13 Times in 13 Posts
|
New get_data.php | |
| | ||
| |
|
| Bookmarks |
| Tags |
| based, filled, output, user, webform |
| |