Jump to content

Search the Community

Showing results for tags 'php начинающий'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Development
    • HTML Coding
    • JavaScript
    • PHP
    • CMS
    • Database
    • Web Server
    • Web-site Development
    • Internet Marketing, SEO
  • Library
    • Tricks and solutions
    • Books
  • Commercial services
    • Freelance
    • Job
    • Goods and Services
  • Our Forum
    • Flame
    • Contests
    • Feedback and Ideas

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Web site


Telegram


Signal


Viber


Skype


From


Interests

Found 1 result

  1. Начал изучение php, поставил задачу себе написать простенький сервис. Сделал скрипт регистрации пользователя, но как-то он меня не устраивает. Покажите где я наговнокодил и ткните в ошибки. <?phprequire_once '../includes/mysql_on.php';$login=trim($_POST['login']);$pass=trim($_POST['pass']);$mail=trim($_POST['mail']);$login=stripslashes($login);$pass=stripslashes($pass);$mail=stripslashes($mail);$login=htmlspecialchars($login);$pass=htmlspecialchars($pass);$mail=htmlspecialchars($mail); if (empty($login)) { header('location:../index.php'); die(); } elseif (empty($pass)) { header('location:../index.php'); die(); } elseif (empty($mail)) { header('location:../index.php'); die(); }else { $chek_db = $connect->prepare('SELECT count(*) FROM users WHERE login=?'); $chek_db->bind_param('s',$login); $chek_db->execute(); $chek_db->bind_result($n); $chek_db->fetch(); $chek_db->close(); if ($n==0) { $sign_db = $connect->prepare('INSERT INTO users(login,pass,mail) VALUES(?,?,?)'); $sign_db->bind_param('sss',$login,md5($pass),$mail); $sign_db->execute(); $sign_db->close(); }}require_once '../includes/mysql_off.php';header('location:../index.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. See more about our Guidelines and Privacy Policy