Check user and redirect

From: Terje Sæternes (terje_at_cyberfactory.no)
Date: 10/30/04


Date: Sat, 30 Oct 2004 18:03:50 +0200

Hello folks... I'm stuck with this problem.

I'm look if it is a user with the username before and if so the variable
$totalRows_sjekkbrukernavn show how many, and should redirect to the
errorpage.
Should the code below work?

if (($totalRows_sjekkbrukernavn > 0) &&
(isset($HTTP_POST_VARS["MM_insert"]))) {
$insertGoTo = "cup.php?ac=reg&steg=2&brukernavn=error";
  header(sprintf("Location: $insertGoTo"));
} else { // Put into database}



Relevant Pages

  • Re: mysql help
    ... Conversation: mysql help ... >the database for the username and password. ... else redirect to an error page. ...
    (alt.php)
  • Re: O.T. .htaccess
    ... If myusername is not a valid page I want to redirect to index.php passing ... Where I will then search for the username within my database and then,if ...
    (alt.php)
  • Re: session value lost
    ... >into as sessionvariable (username). ... So I redirect to my search.aspx. ... >I save the recordid to the session and redirect to work.aspx. ... >new sqlstring I fetch the data from the sqlserver. ...
    (microsoft.public.dotnet.framework.aspnet)
  • problem redirecting to protected directory
    ... knowing/seeing the 'username' and 'password' that protects the dir. ... How can I redirect the visitor to this 'secure'-dir without showing the ... I've tried to use the header-function several ways, but the popup keeps ... The only problem with JavaScript is that when it is disabled in the visitors ...
    (php.general)
  • Re: Dynamic page content display
    ... i am working on a java tapestry based web application. ... they should be redirected to the user login page where they have ... to enter their username and password. ... Are you really really sure the redirect is working? ...
    (comp.lang.java.programmer)