...

View Full Version : PHP-mysql coding help needed,login problem,automatic email problem,display problem



jeffry
01-25-2007, 09:23 AM
Hi all,
Normally,if we include
suppose in page:'weblogin.php',

if(-----------)
{
include("index.php");
exit();
}

Then on submitting this form,the second page-'index.php' is showing above or below the 'weblogin.php' page.But i want it to show in a new browser,i mean in a new page and also the previous one i.e,'weblogin.php' should get closed on opening the other page.

Doubt 2:

I have 'weblogin.php' as my login form(username,password)
On loging in,this goes to 'index.php' page.If i type directly http://localhost/index.php then in actual case it should not display the output instead it should show some error message.But this is not happening.'index.php' should only be accessed from 'weblogin.php' at any case.

Doubt 3:

how to check email and empty entry textbox validation in php form

Doubt 4:

I am doing an employee webpage in which one of the table is empinfo(name,email,employee no,DOB).I want to send automatic b'day wishes to the each employee email who is having b'day on that particular day.


How to get solved all these...?,.
Please help

barlas
01-25-2007, 09:37 AM
1. It seems you want user to enter username/password and upon submit then take them to index.php, right? Why don't you use <form> tags in html to achieve this?

2: You would have to use session variables for that purpose, http://www.tizag.com/phpT/phpsessions.php
You can use this tutorial to set session variables and then on the start of index.php add:
if (!isset($_SESSION['variable'])
header("Location:weblogin.php") This would redirect users who haven't logged in back to weblogin.php

BTW you should always use separate thread for each problem.

brijendra_singh
01-26-2007, 07:02 AM
Hi jeffry

I saw ur problem as much i m getting u...i suggest u to do 1 thing i.e.

include your weblogin.php in 1 page and after login do not include ur index.php in if statement on the same page but
in ur weblogin.php ----after getting correct username and password include ur index.php.

i mean do like this..
if(weblogin.php)
{welcome $_SESSION}
else
{ redirect to the same page)

in weblogin.php

if(login succeed){
include(index.php)}
else
{login error or send user on the page where weblogin is being included}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum