Jump to content

Search the Community

Showing results for tags 'php mysql (html?) echo usern'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello, I have download a 'sign up email login form' on the web, the process works (email confirmation), but when after signed i want to echo/print the username I got errors. Here my code (at bellow 'echo 'username'': <?php session_start(); include_once 'inc/php/config.php'; include_once 'inc/php/functions.php'; error_reporting(E_ALL); ini_set( 'display_errors','1'); include 'inc/elements/signed.php'; ?> <?php //setup some variables $action = array(); $action['result'] = null; //check if the $_GET variables are present //quick/simple validation if(empty($_GET['email']) || empty($_GET['key'])){ $action['result'] = 'error'; $action['text'] = 'We are missing variables. Please double check your email.'; } if($action['result'] != 'error'){ //cleanup the variables $email = mysql_real_escape_string($_GET['email']); $key = mysql_real_escape_string($_GET['key']); //check if the key is in the database $check_key = mysql_query("SELECT * FROM `confirm` WHERE `email` = '$email' AND `key` = '$key' LIMIT 1") or die(mysql_error()); if(mysql_num_rows($check_key) != 0){ //get the confirm info $confirm_info = mysql_fetch_assoc($check_key); //confirm the email and update the users database $update_users = mysql_query("UPDATE `users` SET `active` = 1 WHERE `id` = '$confirm_info[userid]' LIMIT 1") or die(mysql_error()); //delete the confirm row $delete = mysql_query("DELETE FROM `confirm` WHERE `id` = '$confirm_info[id]' LIMIT 1") or die(mysql_error()); if($update_users){ $action['result'] = 'success'; $action['text'] = 'User has been confirmed. Thank-You!'; }else{ $action['result'] = 'error'; $action['text'] = 'The user could not be updated Reason: '.mysql_error();; } }else{ $action['result'] = 'error'; $action['text'] = 'The key and email is not in our database.'; } } ?> <?= show_errors($action); ?> <?php include 'hotel/reception.php'; echo "Welcome 'username'"; ?> <?php include 'inc/elements/footer2in.php'; ?>confirm11.phpconfirm11.phpconfirm11.phpconfirm11.php
×
×
  • 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.