Plea se help I need a "Submit email to access webste script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hsarbaz
Forum Newbie
Posts: 2
Joined: Fri Feb 27, 2009 2:37 pm

Plea se help I need a "Submit email to access webste script

Post by hsarbaz »

I want to create a simple form that requires people to submit their email before they are allowed to acces the index.html page.

I know it's easy to do I'm learning php. Can anyone please help me? I have to get this done by tomorrow!

Thanks!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Plea se help I need a "Submit email to access webste script

Post by califdon »

You can find many scripts at sites for that purpose, like hotscripts.com and many others. This is a forum for helping PHP developers who have a specific coding problem.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Plea se help I need a "Submit email to access webste script

Post by aceconcepts »

I'd listen to califdon but if you're interested in learing then I'd research html forms, php variables and some condition statements e.g. IF THEN ELSE etc...

Use your noggin and do some research via a preferred search engine. Once you have something but are still stuck, then come back to us. It always helps if you have something to show :D
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Plea se help I need a "Submit email to access webste script

Post by califdon »

I think the issue here is that someone that has a deadline "tomorrow" clearly isn't planning to learn how to do it himself. It's either a homework assignment or his boss is asking for it, in either case I don't feel like doing his work for him.
mars_rahul
Forum Newbie
Posts: 12
Joined: Thu Aug 06, 2009 12:22 am

Re: Plea se help I need a "Submit email to access webste script

Post by mars_rahul »

ok do this


When people login to ur site.First they goes to index.php.

For Example:

http://www.xxxx.com/index.php

In index.php;

if(session['visited'] == false)
{
header("Location:email.php");
exit();
}
else
{
IT will be the normal home page.
}

And in Email.php:

if(isset($session['visited']))
{
header("Location:index.php");
}
else
{
$session['visited'] = True;
------ Here goes the normal code of email.
}
Post Reply