Tom's Guide > Forum > Programmation > problème pour la redirection après login

problème pour la redirection après login

Forum Programmation : problème pour la redirection après login

TomsGuide.com : 800 000 inscrits répondent à toutes vos questions high-tech et informatique. Pour obtenir de l'aide, inscrivez-vous gratuitement !
Mot :    Pseudo :           
 

Bonjour,
Je fais une identification pour aller sur un intranet mais là je bloque un peu.
lorsque je me logue la page ne va pas vers ma redirection index.php mais reste sur login2.php en laissant afficher que l'image...
Voici le code
Merci pour votre aide

Code :
  1. <body>
  2. <table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
  3.   <tbody>
  4.     <tr>
  5.       <td style="width: 40px;"><img style="width: 30px; height: 30px;" alt="" src="images/img_connect.gif"></td>
  6.       <td style="width: 649px;"><?php $error = "";
  7. @$step = $_GET['step'];
  8. include ("admin/param.inc.php" ); // Constantes
  9. include ("language/".LANG.".inc.php" ); // Language
  10. include ("style.inc.php" ) ; // Font, color, etc
  11. require ("config.inc.php" ) ; // connection to database
  12. /* Checking user access */
  13. if ( $step==1 )
  14. {
  15. $pwdus = md5($_GET['pwdus']);
  16. $qry = "SELECT IdUs, NameUs ".
  17. "FROM ".USER." ".
  18. "WHERE LoginUs = '".$_GET['loginus']." ' ".
  19. "AND PwdUs = '".$pwdus." ' ";
  20. $ret = mysql_query($qry, $cnx) ;
  21. $col = mysql_fetch_row($ret) ;
  22. $idus = $col[0]; if ( $idus==0 ) { $error = $txt[16];
  23. unset($step);
  24. }
  25. else {
  26. setcookie($cookie,$idus,time()+3600,"/" );
  27. echo "<SCRIPT>javascript:document.location.href='index.php'();</SCRIPT>";
  28. exit;
  29. } }
  30. /* Identification */
  31. if ( !isset($step) )
  32. {
  33. echo "<HTML><HEAD>
  34. <TITLE>ASCOMETAL 38 / SOGEST INDUSTRIE</TITLE>
  35. <BODY BACKGROUND=\"images/$backimg\">" ;
  36. echo "<P><FONT FACE=\"$font\" SIZE=2 COLOR=RED>".$error."&nbsp;</P>";
  37. print("<FORM ACTION=\"#\" METHOD=\"GET\">
  38. <INPUT TYPE=\"HIDDEN\" NAME=\"step\" VALUE=\"1\">
  39. <TABLE WIDTH=75% BORDER=0>
  40. <TR>
  41. <TD COLSPAN=2>
  42. <FONT FACE=$font SIZE=4>$txt[12]</FONT><BR>&nbsp;</TD>
  43. </TR>
  44. <TR>
  45. <TD><FONT FACE=\"$font\" SIZE=2>$txt[13]</TD>
  46. <TD><INPUT TYPE=\"TEXT\" NAME=\"loginus\"></TD>
  47. <TR>
  48. <TD><FONT FACE=\"$font\" SIZE=2>$txt[14]</TD>
  49. <TD><INPUT TYPE=\"PASSWORD\" NAME=\"pwdus\"></TD>
  50. </TR>
  51. <TD COLSPAN=2><P>&nbsp;<CENTER>
  52. <INPUT TYPE=\"SUBMIT\" VALUE=\"$txt[15]\"></TD>
  53. </TR>
  54. </TABLE>
  55. </FORM>" );
  56. }
  57. /* Erase the cookie */
  58. if ( $step==3 ) {
  59. setcookie($cookie,"",time()-3600,"/" );
  60. echo "<SCRIPT>javascript:document.location.href='index.php'();</SCRIPT>";
  61. }
  62. php?></td>
  63.     </tr>
  64.   </tbody>
  65. </table>
  66. </body>

Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.
Tom's Guide > Forum > Programmation > problème pour la redirection après login
Aller à :

Il y a 2026 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens