Il y a actuellement 905 visiteurs
Dimanche 03 Mai 2026
accueilactualitésdossierscomparer les prixtélécharger gratuitement vos logicielsoffres d'emploiforum informatique
Connexion
Créer un compte

Evolution Code version PHP

Besoin d'aide pour configurer un serveur ? Vous souhaitez obtenir des conseils pour référencer votre site ? Un petit souci pour accéder à votre FTP ? Des soucis de programmation en PHP / ASP / HTML / XHTML / XML / XSLT / CSS / ReactJS / AngularJS / VueJS / CGI / PERL / C / MySQL / PostgreSQL ??? Nous avons peut-être la solution dans ce forum ...

Evolution Code version PHP

Message le 27 Mai 2016 23:39

Bonjour, actuellement j'ai un site intranet, qui est stocké sur un serveur wamp, avec PHP version 5.4.3 . Je souhaiterais migrer sur PHP7.0, mais le code php de mon site est très très obselete. je recherche quelqu'un qui pourrait me ré-écrire ce morceau de code de ma page de login.php :

Code: Tout sélectionner
<?php

if(isset($_POST['submit']))
{
    $pseudo = htmlspecialchars(trim($_POST['pseudo']));
    $password = htmlspecialchars(trim($_POST['password']));

    if(empty($pseudo))
    {
        echo "<font color='red'>Veuillez saisir votre Nom d'utilisateur!<br/></font>";
    }
   
    else if(empty($password))
    {
        echo "<font color='red'>Veuillez saisir votre mot de passe!</font>";
    }
    else{

    mysql_connect('localhost','root','');
    mysql_select_db('matable');

    $password = md5($password);

    $login = mysql_query("SELECT * FROM usersite WHERE username='$pseudo'AND password='$password'");

    $rows = mysql_num_rows($login);
   
    if($rows == 1)
    {

        $_SESSION['pseudo'] = $pseudo;

        header('location:index.php');   

    }else echo "<font color='red'>Utilisateur, mot de passe!</font>";

    }
}

?>


Merci d'avance.
Dernière édition par RobinSG le 30 Juin 2016 08:25, édité 1 fois.
Raison: Ajout balises "code"
drtgx
Visiteur
Visiteur
 
Messages: 3
Inscription: 10 Jan 2015 15:05
 



Sujets similaires

Message Kraken Referral Code: [bqbhddw3] Free $200 Crypto Bonus
"Ready to start your crypto journey with one of the most trusted names in the industry? Kraken is offering an exclusive opportunity for new traders to kickstart their portfolio. By using the Kraken Coupon Code: [bqbhddw3], you can qualify for a trading credit and rewards worth up to $200.Whethe ...
Réponses: 0

Message Kraken Referral Code: [thd9d5yg] Get Up to $200 Reward on Si
"If you are looking to dive into the world of cryptocurrency, there is no better time than now. Kraken, one of the world?s oldest and most secure cryptocurrency exchanges, is currently offering a fantastic promotional opportunity. New users who sign up using the Kraken Referral Code: [thd9d5yg] ...
Réponses: 0

Message Moomoo Referral Code: 7K6APMM [Get 8% Apy + Up to 15 free St
"Earn Up to 15 Free Stocks + 8% APY with Moomoo Referral Code 7K6APMMIf you?ve been looking for a way to start investing smarter and get rewarded instantly, Moomoo has one of the best promotions available right now. By signing up with the Moomoo referral code 7K6APMM, you can unlock up to 15 fr ...
Réponses: 0

Message Moomoo Referral Code: 4T8VF3HM [Get 8% Apy + Up to 15 free S
"Earn Up to 15 Free Stocks + 8% APY with Moomoo Referral Code 4T8VF3HMIf you?ve been looking for a way to start investing smarter and get rewarded instantly, Moomoo has one of the best promotions available right now. By signing up with the Moomoo referral code 4T8VF3HM, you can unlock up to 15 ...
Réponses: 0

Message Moomoo Referral Code: FLR35EXM [Get 8% Apy + Up to 15 free S
"Earn Up to 15 Free Stocks + 8% APY with Moomoo Referral Code FLR35EXMIf you?ve been looking for a way to start investing smarter and get rewarded instantly, Moomoo has one of the best promotions available right now. By signing up with the Moomoo referral code FLR35EXM, you can unlock up to 15 ...
Réponses: 0

Message Moomoo Referral Code: NQUFSF9M [Get 8% Apy + Up to 15 free S
"Earn Up to 15 Free Stocks + 8% APY with Moomoo Referral Code NQUFSF9MIf you?ve been looking for a way to start investing smarter and get rewarded instantly, Moomoo has one of the best promotions available right now. By signing up with the Moomoo referral code NQUFSF9M, you can unlock up to 15 ...
Réponses: 0

Message Moomoo Referral Code: 7J6AP9MM [Get 8% Apy + Up to 15 free S
"Earn Up to 15 Free Stocks + 8% APY with Moomoo Referral Code 7J6AP9MMIf you?ve been looking for a way to start investing smarter and get rewarded instantly, Moomoo has one of the best promotions available right now. By signing up with the Moomoo referral code 7J6AP9MM, you can unlock up to 15 ...
Réponses: 0


Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité


.: Nous contacter :: Flux RSS :: Données personnelles :.