Jump to content

rbatista

Members
  • Posts

    5
  • Joined

  • Last visited

rbatista's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. Hey !!! I fixed everything adding this at the begining of the script ob_start(); Thanks everyone for your support...
  2. This is the error showing : Warning: Cannot modify header information - headers already sent by (output started at /home/aprendaa/public_html/includes/head.php:30) in /home/aprendaa/public_html/login.php on line48 THIS IS HEAD.PHP <!DOCTYPE html> <html lang="en"> <head> <title>Aprenda Ahora</title> <meta charset="utf-8"> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <link rel="stylesheet" href="css/layout.css" type="text/css" media="all"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all"> <link rel="StyleSheet" href="css/burgundy.css" type="text/css"> <script type="text/javascript" src="js/jquery-1.5.2.js" ></script> <script type="text/javascript" src="js/cufon-yui.js"></script> <script type="text/javascript" src="js/cufon-replace.js"></script> <script type="text/javascript" src="js/Molengo_400.font.js"></script> <script type="text/javascript" src="js/Expletus_Sans_400.font.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <!--[if lt IE 9]> <script type="text/javascript" src="js/html5.js"></script> <style type="text/css"> .bg, .box2 {behavior:url(js/PIE.htc)} </style> <![endif]--> <!--[if lt IE 7]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"> <img src="http://www.theie6countdown.com/images/upgrade.jpg" border="0" alt="" /></a> </div> <![endif]--> </head> <== THIS IS LINE 30 ON HEAD.PHP ======================================================================================================== THIS IS LOGIN.PHP <?php include 'desplegaerror.php'; // Luego Quitar include 'core/init.php'; logged_in_redirect(); include 'includes/head.php'; ?> <body id="page2"> <?php include ("bodyy1.htm") ?> <div class="body2"> <div class="main"> <!-- content --> <section id="content"> <div class="box1"> <div class="wrapper"> <article class="col1"> <div class="pad_left1"> <?php if (empty($_POST) === false) { $username = $_POST['username']; $password = $_POST['password']; if (empty($username) === true || empty($password) == true) { $errors[] = "Usted necesita entrar un Username y un Password"; } else if (user_exists($username) === false) { $errors[] = "No podemos encontrar su Username. Estás registrado ?"; } else if (user_active($username) === false) { $errors[] = "Usted no ha activado su cuenta !"; } else { if (strlen($password) > 32) { $errors[] = "Password muy largo !!!"; } $login = login($username, $password); if ($login === false) { $errors[] = 'Esa combinación de Username/Password es Incorrecta'; } else { // set the user session // redirect user to home $_SESSION['user_id'] = $login; header('Location: index.php'); <== THIS IS LINE 48 ON LOGING.PHP exit(); } } } else { $errors[] = 'No se recibió ningun dato'; }
  3. ok... I will, thanks, I will let you know...
  4. Thanks all for your comments... What I mean is, that with that codes everything is working fine on the same script..... that script is name : admissions.php and if everything works fine then it calls itself. That's working perfect, but in my side.... I mean, working fine using my PC, but when I uploaded to my hosting, then the only thing that fails is that part : header("Location: admissions.php?success"); that part is not reloading the page again, or in other words, no calling again the script admissions.php with ?success .
  5. Hi, I'm new programming with PHP and I am having this problem : Here are the codes : <?php if (isset($_GET['success']) && empty($_GET['success'])) { echo "<br>"; echo "<h4>You have been registered successfully.</h4>"; } else { if (empty($_POST) === false && empty($errors) === true) { // $register_data = array ( 'username' => $_POST['username'], 'password' => $_POST['password'], 'first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'email' => $_POST['email'] ); register_user($register_data); header("Location: admissions.php?success"); exit(); } else if (empty($errors) === false) { // Print error echo output_errors($errors); } ?> // End of the codes... Everything is working fine at my PC as localhost, but I put it's not working fine with my hosting. I mean, the header("Location: admissions.php?success"); works fine at my localhost, like reloading the page with SUCCESS, but with the hosting, then the admissions.php?success is not executed, is showing me a blank page. If I type the admissions.php?success at the browser, then it shows me the page... How can I fix that problem ? Thanks
×
×
  • Create New...