PHP LINK

Gang67

|Jump out gang, we jump out those vehicles|
May 5, 2017
303
54
Thread moved. Habbo related things belong in Habbo Help & Support.
Hello, just wondering how I make it so when the login button is pressed it shows up the errors, for example 'Please enter a username' and it also checks if its a real/correct name and password using the database

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<html lang = "en">
<head>
<title>{hotelname} | Index</title>

<link rel="stylesheet" href=" " type="text/css" />
<script src=" "></script>

</head>
<body>
<div class="logo"></div>
<div class="online">There are <b>{online_count)</b> people online.</div>
<div class="errormessage">Error bar</div>

<div class="container">

<div class="title">Login</div>

<div class="content">

<input type="text" name="email" id="email" class="form" placeholder="Email"> <br /><br />
<input type="text" name="email" id="email" class="form" placeholder="Password"> <br /><br />
<input type="submit" name="login" id="login" class="submit">

<div class="button_register">
Register
</div>
</div>
</div>


<script>

var registerURL ="file:///C:/Users/abdu/Desktop/project%20x/register.html";
$('.button_register').click(function(){window.location.href=registerURL})
$.fn.center = function() {
var element = this;

element.css({
'left': $(window).width() / 2 - element.width() / 2 + 'px'
})

return element
}

$('.container').center();
$('.errormessage').center();

</script>
</body>
</html>
 

Jeffrey

Devbest Indian Tech Support
FindRetros Moderator
Feb 5, 2013
1,180
412
Since RevCMS already has that built in, you would just have to type in {error} somewhere I am assuming.
 

Menkz

Member
Jul 9, 2010
374
167
RevCMS has this built in.

PHP:
<?php if(isset($template->form->error)) { ?>
<span style="background-color: #EA0000; color: #ffffff; padding: 0.75rem; border-radius: 0.5rem; font-size: 15px; border: 2px solid #b90000;">
<?php echo $template->form->error; ?>
</span>
<?php } ?>
 

Gang67

|Jump out gang, we jump out those vehicles|
May 5, 2017
303
54
RevCMS has this built in.

PHP:
<?php if(isset($template->form->error)) { ?>
<span style="background-color: #EA0000; color: #ffffff; padding: 0.75rem; border-radius: 0.5rem; font-size: 15px; border: 2px solid #b90000;">
<?php echo $template->form->error; ?>
</span>
<?php } ?>
So I just copy this?
 

Users who are viewing this thread

Top