Link to home
Start Free TrialLog in
Avatar of JakeSpencer
JakeSpencer

asked on

Capturing Name and Email address before allowing a webpage to be viewed.

Hello

Our marketing department have asked for a list of name and email addresses of people that view a specific webpage.

Lets say we have this page:

http://www.mysite.com/tutorials

Before a user can view the tutorials, they must enter their Name and Email Address into a form.  They can then view the tutorials.

Their Name and Email address needs to be saved in some form on the server so Marketing can view it.

Most of the current website uses HTML and PHP.  I can create a mySQL database to store the names and addresses if necessary, but would prefer a simpler way of doing it.

I hope what I am after makes sense, thanks for any advice.

Kind Regards.
Avatar of Lukasz Chmielewski
Lukasz Chmielewski
Flag of Poland image

This is the simplest way. What you are thinking about is storing it in a file, which is the only alternative regarding using only html and php. Storing this kind of data in a files is not comfortable neither easy to retrieve using html and php (or should I say easier than with MySQL).

Use the database, then you can create a module for your Marketing to view the data in a nice tabular way.
Avatar of JakeSpencer
JakeSpencer

ASKER

Thanks.  Herein lies my problem.

I can create a database and database user in phpMyadmin.  I can create a form in Dreamweaver.

I have no idea how to make the form write to the database then continue to load the tutorials page.

Appreciate any pointers.

Many Thanks
OK, so let's start with this. Is the email and name required for login ? I mean - when the user is registered ? If not, can anybody access the tutorials only by entering the email and address ? There could be problems with dummy email addresses.

What about the registration process ? What do you think. This could authenticate the user, so he could enter the tuts AFTER logging into the form.
Hello

At this stage no validation is required.  Just a name and Email address.

So just a quick form "Please Enter your name and email address to access the tutorials".

The user enters a name and email address, presses Continue and the tutorials page loads.  When pressing Continue the data must be stored in the database.

I realise Validation would be better, but at this stage want to keep it as simple as possible.

Thanks

ASKER CERTIFIED SOLUTION
Avatar of Lukasz Chmielewski
Lukasz Chmielewski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the advice.  I'm a complete newbie to PHP and those pages look very indepth.  I do not need any form of username / authentication or password etc.

Just for a name and email address to be entered so Marketing can see who actually looks at the page.

Perhaps I will have to tell them it is beyond my abilities as these solutions look too complicated for what they want.

Mant thanks for trying to help though.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That looks great.  How do I give it the database name to write the name and email address to?

Many Many thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Many thanks for the assistance.  I'll get the book and see if I can brush up on mu skills.

Thanks again.

Lee