Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question PHP-mysql coding help needed,login problem,automatic email problem,display problem

    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

  • #2
    New to the CF scene
    Join Date
    Jan 2007
    Location
    Lahore, Pakistan
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:
    PHP Code:
    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.

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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}


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •