Jump to content

azdrian21

Members
  • Posts

    31
  • Joined

  • Last visited

About azdrian21

  • Birthday 03/02/1990

Contact Methods

  • MSN
    azdrian18@hotmail.com
  • Yahoo
    azdrian19@yahoo.com
  • Skype
    azdrian201

Profile Information

  • Gender
    Male
  • Location
    trinidad and tobago
  • Interests
    Reading,playing the guitar, web design/development, mobile apps, etc
  • Age
    24

azdrian21's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. oh sorry this is the login page: <?php //login_Page.inc.php $page_title ='Login'; include('includes/header.html'); if (!empty($errors)) { echo '<h1>Error!</h1><p class="error">The following error(s) occurred:<br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } echo '</p><p>Please try again. </p>'; } ?> <h1>Login Page</h1> <!-- Start of FORM --> <form method="post" action="login.php"> <p>Username: <input type="text" name="user_name" size="20" maxlength="80" value=" <?php if (isset($_POST['user_name'])) {echo $_POST['user_name'];} ?> "></p> <p>Password: <input type="password" name="user_pass" size="20" maxlength="20"></p> <p><input type="submit" name="submit" value="login"></p> <input type="hidden" name="submitted" value="TRUE"> </form> <!-- End of FORM --> <?php include('includes/footer.html'); ?>
  2. hello all i am building a small forum website for kids to discuss their school work etc. As this website will be assess by my prospect employer for a job as a entry level web apllication developer. The problem is am having this error : Notice: Undefined index: user_name in C:\wamp\www\pennacool_forum\loggedin.php on line 21 when i tried to display the user name in the session of the user who just loggedin. here is the loggedin.php script: <?php // loggedin.php // The user is redirected here from login.php. session_start(); // Start the session. // If no session value is present, redirect the user: // Also validate the HTTP_USER_AGENT! if (!isset($_SESSION['agent']) OR ($_SESSION['agent'] != md5($_SERVER['HTTP_USER_AGENT']) )) { require_once ('includes/login_functions.inc.php'); $url = absolute_url(); header("Location: $url"); exit(); } $page_title = 'Logged In!'; include ('includes/header.html'); // Print a customized message: echo "<h1>Logged In!</h1> <p>You are now logged in, {$_SESSION['user_name']}!</p> <p><a href=\"logout.php\">Logout</a></p>"; include ('includes/footer.html'); ?> this is the login function: function check_login($dbc, $user_name = '', $user_pass = '') { $errors = array(); // Initialize error array. // Validate the email address: if (empty($user_name)) { $errors[] = 'You forgot to enter your username.'; } else { $u = mysqli_real_escape_string($dbc, trim($user_name)); } // Validate the password: if (empty($user_pass)) { $errors[] = 'You forgot to enter your password.'; } else { $p = mysqli_real_escape_string($dbc, trim($user_pass)); } if (empty($errors)) { // If everything's OK. // Retrieve the user_id and first_name for that email/password combination: $q = "SELECT user_id, user_email FROM users WHERE user_name='$u' AND user_pass=SHA1('$p')"; $r = @mysqli_query ($dbc, $q); // Run the query. // Check the result: if (mysqli_num_rows($r) == 1) { // Fetch the record: $row = mysqli_fetch_array ($r, MYSQLI_ASSOC); // Return true and the record: return array(true, $row); } else { // Not a match! $errors[] = 'The username and password entered do not match those on file.'; } } // End of empty($errors) IF. // Return false and the errors: return array(false, $errors); } // End of check_login() function. ?> here is the login script: <?php #login.php if (isset($_POST['submitted'])) { require_once ('includes/login_functions.inc.php'); require_once ('mysqli_connect.php'); list ($check, $data) = check_login($dbc, $_POST['user_name'], $_POST['user_pass']); if ($check) { // OK! // Set the session data:. session_start(); $_SESSION['user_id'] = $data['user_id']; $_SESSION['user_name'] = $data['user_name']; // Store the HTTP_USER_AGENT: $_SESSION['agent'] = md5($_SERVER['HTTP_USER_AGENT']); // Redirect: $url = absolute_url ('loggedin.php'); header("Location: $url"); exit(); } else { // Unsuccessful! $errors = $data; } mysqli_close($dbc); } // End of the main submit conditional. include ('includes/login_page.inc.php'); ?> thanks in advance guys !
  3. Welcome unstoppixe i am also in the same position as you. i join phpfreaks a while now but am so busy learning everything else becomes trivial. Am learning php\ mysql, javascript, CSS, perl and web design at the same time yeah am mad!! good luck with learning as well!!
  4. A website should be aesthetically pleasing- IMHO your site don't possess much of that quality. my simple phrase : "the quality of the site determines the quality of the site content". The idea of the site layout is good but you're not utilizing the space you have correctly. especially the elements on the page showing a single tutorial, are not structured properly, looking like if they struggling to breathe. you may consider to : tweak the layout color: use a color scheme or use a color to complement the green. This is just my opinion.
  5. the design is good but the colors are off. find a color to complement one shade of green.
  6. i second 1UP. the user interface should be revamp.(colors and layout.The elements on the page is choke up).As the developer you may think that the website is perfect but your users will discover mistakes that might be overlooked by you. Let users be your eyes.i Don't want to be blunt here but i spend under 2 mins on the site because the site usability is poor. Have a look at dont make me think steve krug book, based on usability. 5 /10
  7. hey does anyone know how to build a live streaming application: well the purpose of the application to allow music tutor to teach piano lessons online live and accept payments directly (maybe through pay pal). could anyone discuss what technologies i must have to develop this application please.i will appreciate the help
  8. could anyone with the experience discuss how to approach/plan developing web applications from start to finish. i know there are methodolgies to follow in developing applications but i want everybody opinion well who could answer.
  9. Web development books (PHP & mysql): Beginners: )PHP for the Web: Visual QuickStart Guide (4th Edition: nice job done by author Larry ullman bottles up everything for php beginners ready to jump into the web development world. PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition): another good beginner book. the book takes "little" faster pace in the process of teaching the concepts to the reader but still full fills it desired purpose remarkably. PHP 5 Advanced: Visual QuickPro Guide (2nd Edition):after you covering the basic and having practically a good grasp of PHP and MYSQL this book will expands your horizon by teaching complex concepts of using PHP and MYSQL to its fullest potential.
  10. i second what fugix said instead of killing him more u should lend a hand shortysbest thats whats the forums for. share some of your knowledge to help him achieve what u have achieved.
  11. yeah currently am learning php and MySQL using PHP for the web by Larry Ullman,a good book. practically i know the basics already i decide to revise them so i can have a good foundation of the basics then build on that. then again sometimes i'll feel to run ahead and skip chapters of the to build the sample application it provides.lolz guess am impatience.
  12. simple but yet effective. i will rate it 20/10 *simple layout design *ease of navigation *nice color scheme but could improve (add a complementary color to blend with the blue and white)
  13. don't mean to be blunt but your website need a total revamp. You totally wont draw the crowd but instantly run them. you need to review the principles of web design eg. Layout, typography, easy navigation,usability etc.guess this is your first try so try again you can do it.
  14. YEAH i am passionate about web development .i have tons of books and resources on it but just dunno where to start lolz .thanks for the opinion guys.so much to learn but will get there someday!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.