Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok dito

Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

wala p po ako script eh dko po kc alam kung pano yun
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Hello guys. I will be having a development in a file with .FTL extension having Tomcat as Server and Linux as its OS. What Template Engine can you prefer to use. thank you for any tips there!
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

patulong nman..

nasa Adding form tayo.. pwede ba yun pag click ko sa dropdown list at e click ko yung "TEACHER I" lalabas agad sa textbox yung salary grade nya? wala pa pong laman yung Database.

- - - Updated - - -

<label for="input" class="col-sm-4 control-label">Image:</label>
<input type="file" name="image" class="font" value="<?php echo $row['location']; ?>">

blank when im editing my info... eto lang yung fields na blank.. kahit andun sa database ko...
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

patulong nman..

nasa Adding form tayo.. pwede ba yun pag click ko sa dropdown list at e click ko yung "TEACHER I" lalabas agad sa textbox yung salary grade nya? wala pa pong laman yung Database.

- - - Updated - - -

<label for="input" class="col-sm-4 control-label">Image:</label>
<input type="file" name="image" class="font" value="<?php echo $row['location']; ?>">

blank when im editing my info... eto lang yung fields na blank.. kahit andun sa database ko...
sir use blob type po para sa images..
google mo lang
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir may link po ba kau ng tutorial para sa mga web base systems?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ano kaya kulang ko dito

send.php
<?php

//################################################## ########################
// ITEXMO SEND SMS API
// Visit www.itexmo.com/developers.php for more info about this API
//################################################## ########################
function itexmo($number,$message,$apicode){
$url = 'https://www.itexmo.com/php_api/api.php';
$itexmo = array('1' => $number, '2' => $message, '3' => $apicode);
$param = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($itexmo),
),
);
$context = stream_context_create($param);
return file_get_contents($url, false, $context);}
function itexmo_bal($apicode){
$url = 'https://www.itexmo.com/php_api/api.php';
$itexmo = array('4' => $apicode);
$param = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($itexmo),
),
);
$context = stream_context_create($param);
return file_get_contents($url, false, $context);}
//################################################## ########################

$result = itexmo("09999045349","Test Message","cuteko");
if ($result == 0){
echo "Message sent!";
}else{
echo "Error Num ". $result . " was encountered!";
}


thanks in advance

try.html
<font size="5" face="arial" color="black">
Contact Form
<form name="contactform" method="post" action="send.php">
<table width="450px">
</tr>
<tr>
<td valign="top">
<label for="telephone">Telephone Number</label>
</td>
<td valign="top">
<input type="text" name="telephone" maxlength="30" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="message">Message *</label>
</td>
<td valign="top">
<textarea name="message" maxlength="640" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
</font>

//##########################################################################
// ITEXMO SEND SMS API
// Visit www.itexmo.com/developers.php for more info about this API
//##########################################################################
function itexmo($number,$message,$apicode){
$url = 'https://www.itexmo.com/php_api/api.php';
$itexmo = array('1' => $number, '2' => $message, '3' => $apicode);
$param = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($itexmo),
),
);
$context = stream_context_create($param);
return file_get_contents($url, false, $context);}
function itexmo_bal($apicode){
$url = 'https://www.itexmo.com/php_api/api.php';
$itexmo = array('4' => $apicode);
$param = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($itexmo),
),
);
$context = stream_context_create($param);
return file_get_contents($url, false, $context);}
//##########################################################################

If(isset($_POST['submit'])){
$number = $_POST['telephone'];
$message = $_POST['message'];
$result = itexmo($number,$message,"API_CODE");
if ($result == 0){
echo "Message sent!";
}else{
echo "Error Num ". $result . " was encountered!";
}
}

<font size="5" face="arial" color="black">
Contact Form
<form name="contactform" method="post" action="send.php">
<table width="450px">
</tr>
<tr>
<td valign="top">
<label for="telephone">Telephone Number</label>
</td>
<td valign="top">
<input type="text" name="telephone" maxlength="30" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="message">Message *</label>
</td>
<td valign="top">
<textarea name="message" maxlength="640" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" name="submit" value="Submit">
</td>
</tr>
</table>
</form>
</font>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ty sir sa info

sir advice ko lang save mo lang yung path ng image instead yung mismong image. kasi mabigat sa db mo saka mas matagal ang pagretreive.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sir advice ko lang save mo lang yung path ng image instead yung mismong image. kasi mabigat sa db mo saka mas matagal ang pagretreive.

ma try ko sir.. may folder ako na dun ma upload yung mga image.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

help sir may ginawa kasi ako sa login form ko running siya yung dun sa walang kadesign design pero nung inadapt ko na siya with twitter bootstrap sa login form ko hindi na sya nagwowork eh here's the scenario

admin will login if correct pupunta siya sa admin.php, main page nang admin at ang lalabas dun sa account_type sa database is admin and then yung status niya is 1="online" and 0="offline at kapag nagsignout na yung admin siyempre magiging offline na siya dapat at kung mali lalabas yung incorrect username/password.

index.php<-- eto yung loginform
<?php
session_start();
include ('auth.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Bootstrap Login Form</title>
<meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>

<!--login modal-->
<div id="loginModal" class="modal show" tabindex="-1" role="dialog" aria-hidden="true">

<div class="box modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="text-center">Login</h1>
</div>
<div class="modal-body">
<form class="form col-md-12 center-block">
<div class="form-group">
<form method="POST" action="index.php">
<input type="text" name="username" class="form-control input-lg" placeholder="Username">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control input-lg" placeholder="Password">
</div>
<div class="form-group">
<input type="submit" name="submit" class="btn btn-primary btn-lg btn-block" value="Log in Now">
<span class="pull-right"><a href="#">Register</a></span><span><a href="#">Need help?</a></span>
</div>

<?php

if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$username = mysql_real_escape_string($username);
$password = md5($password);
// check if the username and password is incorrect
$query = mysql_query("SELECT * FROM tbl_stud WHERE username='$username' AND password='$password'");
if(mysql_num_rows($query) !=0)
{
$_SESSION['username'] = $username; // assign session
$_SESSION['password'] = $password;
// update the status to 1
$update = mysql_query("UPDATE tbl_stud SET status='1' WHERE username ='$username' AND password='$password'");
header('Location: admin.php');
}else

{
echo "Incorrect username or password";
}
}

?>

</form>





<div class="modal-footer">
<div class="col-md-12">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</div>
</div>
</div>
</div>
<!-- script references -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>

auth.php<-- database connection
<?php
// connect to our database
$connect = mysql_connect("localhost","root","");
$mydb = mysql_select_db("hs");

?>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

kasi dapat sana sa ilalim ng navigator mapupunta yung slideshow pag mag scroll down ako. pero hindi napupunta sa ilalim eh sa harap napupunta.
 

Attachments

  • juizy-slideshow-v1.1.1-2015-03-05.rar
    128.3 KB · Views: 0
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

help sir may ginawa kasi ako sa login form ko running siya yung dun sa walang kadesign design pero nung inadapt ko na siya with twitter bootstrap sa login form ko hindi na sya nagwowork eh here's the scenario

admin will login if correct pupunta siya sa admin.php, main page nang admin at ang lalabas dun sa account_type sa database is admin and then yung status niya is 1="online" and 0="offline at kapag nagsignout na yung admin siyempre magiging offline na siya dapat at kung mali lalabas yung incorrect username/password.

index.php<-- eto yung loginform
<?php
session_start();
include ('auth.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Bootstrap Login Form</title>
<meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="css/styles.css" rel="stylesheet" type="text/css">
</head>
<body>

<!--login modal-->
<div id="loginModal" class="modal show" tabindex="-1" role="dialog" aria-hidden="true">

<div class="box modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="text-center">Login</h1>
</div>
<div class="modal-body">
<form class="form col-md-12 center-block">
<div class="form-group">
<form method="POST" action="index.php">
<input type="text" name="username" class="form-control input-lg" placeholder="Username">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control input-lg" placeholder="Password">
</div>
<div class="form-group">
<input type="submit" name="submit" class="btn btn-primary btn-lg btn-block" value="Log in Now">
<span class="pull-right"><a href="#">Register</a></span><span><a href="#">Need help?</a></span>
</div>

<?php

if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$username = mysql_real_escape_string($username);
$password = md5($password);
// check if the username and password is incorrect
$query = mysql_query("SELECT * FROM tbl_stud WHERE username='$username' AND password='$password'");
if(mysql_num_rows($query) !=0)
{
$_SESSION['username'] = $username; // assign session
$_SESSION['password'] = $password;
// update the status to 1
$update = mysql_query("UPDATE tbl_stud SET status='1' WHERE username ='$username' AND password='$password'");
header('Location: admin.php');
}else

{
echo "Incorrect username or password";
}
}

?>

</form>





<div class="modal-footer">
<div class="col-md-12">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</div>
</div>
</div>
</div>
<!-- script references -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>

auth.php<-- database connection
<?php
// connect to our database
$connect = mysql_connect("localhost","root","");
$mydb = mysql_select_db("hs");

?>

ang gulo ng plugins mo...
OFFLINE TO

<link href="css/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" media="screen">
<script src="js/jquery-2.1.3.min.js"></script>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="screen">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen">
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css" media="screen">
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" media="screen">


<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf8" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="js/bootstrap-tab.js"></script>
<script type="text/javascript" src="js/bootstrap-typeahead.js"></script>
<script type="text/javascript" src="js/bootstrap-popover.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">


FYI di ko pa napagana yung DELETE ng modal ko.. sa akin pag click ko ng delete lumalabas cya tapos nawawala agad.. hehe
 
Last edited:
Re: Password Encryption po patulong

Sir patulong po sa php language
pwede po ba patulong pano lagyan po yung login atsaka registration page ko po ng password encryption?
eto po registration form ko po
<!DOCTYPE html>
<html lang="en">
<head>
<title>Register to Fox River Membership</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/carousel.js"></script>
<script src="js/jquery-latest.js"></script>

<script>


function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;

return true;
}
</script>

<style>
body{
margin-top: 100px;
}

.content {
max-width: 800px;
float: left;
margin-left: 80px;
/* border: 1px solid blue; */
display: table;
width: 100%;
}

.rightColumn {
display: table-cell;
padding: 4px 10px 0;
float: right;
vertical-align: top;
width: 230px;
/* border: 1px solid #000; */
}

h3{
-webkit-text-stroke: 1px black;

}

.sign-up
{
width: 362px;
float: right;
margin-right: 30px;
background-color: rgba(0,0,0,.2);
padding: 10px;
border-radius:10px;
}

.side-content h2 {
text-align: center;
font-family: 'Open Sans', arial;


color: #737373;
font-size: 20px;
font-weight: 300;
margin-bottom: 15px;
-webkit-text-stroke:.2px gray ;
}

.side-content{
/*border:1px solid blue;*/
height:560px;
background-image:url("img/bgreg2.jpg");
width:600px;
margin-left: 30px;
background-repeat:no-repeat;
background-position:center;
background-size:650px 650px;
border-radius: 20px;

}
.side-content p{
text-align: center;
font-family: 'Open Sans', arial;
color: #737373;
font-size: 12px;
margin-bottom: 40px;
-webkit-text-stroke:.5px black;
}
.regwhole{
margin: 0 auto;
width: 100%;

padding-top: 20px;
padding-bottom: 50px;
/*border:1px solid blue;*/
}
.regwhole h1:first-child {
margin: 0 0 .92em;
}
.regwhole h1{
text-align: center;
font-family: 'Open Sans', arial;
color: #555;
font-size: 38px;
font-weight: 300;
margin-top: 27px;
margin-bottom: 50px;
}

input#password {
width:180px;
padding:3px;
color: #000;
float:left;
margin-right:10px;
}
#password_strength_wrap {
border: 1px solid #D5CEC8;
display: none;
float: left;
padding: 10px;
position: relative;
width: 320px;
}
#password_strength_wrap:before, #password_strength_wrap:after {
content: ' ';
height: 0;
position: absolute;
width: 0;
border: 10px solid transparent; /* arrow size */
}
#password_strength_wrap:before {
border-bottom: 7px solid rgba(0, 0, 0, 0);
border-right: 7px solid rgba(0, 0, 0, 0.1);
border-top: 7px solid rgba(0, 0, 0, 0);
content: "";
display: inline-block;
left: -18px;
position: absolute;
top: 10px;
}
#password_strength_wrap:after {
border-bottom: 6px solid rgba(0, 0, 0, 0);
border-right: 6px solid #fff;
border-top: 6px solid rgba(0, 0, 0, 0);
content: "";
display: inline-block;
left: -16px;
position: absolute;
top: 11px;
}
#pswd_info ul {
list-style-type: none;
margin: 5px 0 0;
padding: 0;
}
#pswd_info ul li {
background: url(icon_password_strength.png) no-repeat left 2px;
padding: 0 0 0 20px;
}
#pswd_info ul li.valid {
background-position: left -42px;
color: green;
}
#passwordStrength {
display: block;
height: 5px;
margin-bottom: 10px;
transition: all 0.4s ease;
}
.strength0 {
background: none; /* too short */
width: 0px;
}
.strength1 {
background: none repeat scroll 0 0 #FF4545;/* weak */
width: 25px;
}
.strength2 {
background: none repeat scroll 0 0 #FFC824;/* good */
width: 75px;
}
.strength3 {
background: none repeat scroll 0 0 #6699CC;/* strong */
width: 100px;
}

.strength4 {
background: none repeat scroll 0 0 #008000;/* best */
width: 150px;
}

</style>

</head>
<body>

<nav class="navbar navbar-default" style="position: fixed; top: 0; z-index: 99; width: 100%; ; " >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Fox River Resort</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li><a href="activities.php">Activities</a></li>
<li><a href="raso.php">Rates and Special Offer</a></li>
<li><a href="reservation.php">Reservation</a></li>
<li><a href="restaurant.php">Restaurant</a></li>
<li><a href="gallery.php">Gallery</a></li>
<li><a href="contactus.php">Contact Us</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Log In <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" style="padding:17px;">
<li class="dropdown-header"></li>


<form class="form" id="formLogin" action="guest/indexguestlogin.php" method="POST">
<input name="username" id="username" type="text" placeholder="Username" class="form-control" required="required">
<input name="password" id="pwd" type="password" placeholder="Password" class="form-control" required="required"><br>
<input type ="submit" Value="Login" name="submit" class="btn btn-default">
</form>
<li class="divider"></li>
<li class="dropdown-header">Don't have an account? </li>
<li class="active"><a href="regform.php">Register</a></li>

</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>



</body>

<div class="regwhole">
<h1>Create Your Fox River Account</h1>
<div class="sign-up">
<h2>Registration Form </h2>
<form role="form" action="guestreg.php" method="POST">
<div class="form-group">
<label for="firstname">First Name:</label>
<input type="text" class="form-control" id="firstname"required="required" placeholder="Enter firstname" name="firstname">
</div>

<div class="form-group">
<label for="middlename">Middle Name:</label>
<input type="text" class="form-control" id="middlename"required="required" placeholder="Enter middlename" name="middlename">
</div>

<div class="form-group">
<label for="lastname">Last Name:</label>
<input type="text" class="form-control" id="lastname"required="required" placeholder="Enter lastname" name="lastname">
</div>

<div class="form-group">
<label for="username">Username:</label>
<input type="text" class="form-control" id="username"required="required" placeholder="Enter username" name="username">
</div>

<div class="form-group">
<label for="password">Password:</label><BR>
<input type="password" class="form-control" id="password" required="required" placeholder=" Enter password" name="password"><BR>

<div id="password_strength_wrap">
<div id="passwordDescription">Password not entered</div>
<div id="passwordStrength" class="strength0"></div>
<div id="pswd_info">
<strong>Strong Password Tips:</strong>
<ul>
<li class="invalid" id="length">At least 6 characters</li>
<li class="invalid" id="pnum">At least one number</li>
<li class="invalid" id="capital">At least one lowercase & one uppercase letter</li>
<li class="invalid" id="spchar">At least one special character</li>
</ul>
</div><!-- END pswd_info -->
</div><!-- END password_strength_wrap -->


</div>
<script src="js/jquery.min2.js"></script>
<script>
$("input#password").on("focus keyup", function () {
var score = 0;
var a = $(this).val();
var desc = new Array();

// strength desc
desc[0] = "Too short";
desc[1] = "Weak";
desc[2] = "Good";
desc[3] = "Strong";
desc[4] = "Best";

$("#password_strength_wrap").fadeIn(400);

// password length
if (a.length >= 6) {
$("#length").removeClass("invalid").addClass("valid");
score++;
} else {
$("#length").removeClass("valid").addClass("invalid");
}

// at least 1 digit in password
if (a.match(/\d/)) {
$("#pnum").removeClass("invalid").addClass("valid");
score++;
} else {
$("#pnum").removeClass("valid").addClass("invalid");
}

// at least 1 capital & lower letter in password
if (a.match(/[A-Z]/) && a.match(/[a-z]/)) {
$("#capital").removeClass("invalid").addClass("valid");
score++;
} else {
$("#capital").removeClass("valid").addClass("invalid");
}

// at least 1 special character in password {
if ( a.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) {
$("#spchar").removeClass("invalid").addClass("valid");
score++;
} else {
$("#spchar").removeClass("valid").addClass("invalid");
}


if(a.length > 0) {
//show strength text
$("#passwordDescription").text(desc[score]);
// show indicator
$("#passwordStrength").removeClass().addClass("strength"+score);
} else {
$("#passwordDescription").text("Password not entered");
$("#passwordStrength").removeClass().addClass("strength"+score);
}
});

$("input#password").blur(function () {
$("#password_strength_wrap").fadeOut(400);
});
</script>


<div class="form-group">
<label for="repassword">Confirm Password:</label>
<input type="password" class="form-control" id="repassword"required="required" placeholder="Re enter password" name="repassword">
</div>

<div class="form-group">
<label for="Contact No"> Contact Number </label>
<input type="Text" onkeypress="return isNumberKey(event)" class="form-control" id="contactno" required="required" name="contactno" placeholder="+63">
</div>

<div class="form-group">
<label for="Email"> E-mail Address </label>
<input type="Text" class="form-control" id="email" required="required" name="email" placeholder="Input a valid email">
<script language="javascript">

function checkEmail() {

var email = document.getElementById('email');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
}</script>
</div>

<button type="submit" class="btn btn-default" onclick='Javascript:checkEmail();'>Submit</button>

</form>


</div>

<div class="side-content">
<br>
<h2> One account is all you need </h2>

<p> A single username and password for you to experience the ravishing and lovely place of Fox River </p>
</div>

</div>
</body>
</html>
eto naman po reg php ko

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="css/popupwindow.css"/>
<title>Register to Fox River Membership</title>

<div name="content">

<?php

include('dbconnect.php');
$username=$_POST['username'];
$password=$_POST['password'];
$repassword=$_POST['repassword'];
$lastname=$_POST['lastname'];
$middlename=$_POST['middlename'];
$firstname=$_POST['firstname'];
$contactno=$_POST['contactno'];
$email=$_POST['email'];

$_session['username']=$username;
$query = $pdo->prepare("select * from guestfr");
$query->execute();
$query2 = $pdo->prepare("select * from guestfr where username LIKE '%$username%' Limit 0,1");
$query2->execute();

if(empty($_POST['username'])|| empty($_POST['password']) || empty($_POST['lastname'])|| empty($_POST['middlename'])||empty($_POST['firstname'])||empty($_POST['repassword']) ||empty($_POST['contactno']) || empty($_POST['email']))
{
echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Failed!</div>
<div id='dialog-description'>Some fields were left blank. Please fill up all fields.</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Return to Registration</a>

</div>
</div>
</div>";
exit;

}

if($password!=$repassword)
{
echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Failed!</div>
<div id='dialog-description'>Password did not match. Please double check your password.</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Return to Registration</a>

</div>
</div>
</div>";

}
else if (strlen($password) <= 5){
echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Failed!</div>
<div id='dialog-description'>Password is too short. It must be greater than 6 characters.</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Return to Registration</a>
</div>
</div>
</div>";
}



else if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Failed!</div>
<div id='dialog-description'>Email is not valid. Please input a valid email.</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Return to Registration</a>
</div>
</div>
</div>";
}


else if ($check=$query2->fetch())
{

if($check['username'] == $_POST['username'])
{
echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Failed!</div>
<div id='dialog-description'>Username already exist. Please choose another username</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Return to Registration</a>
</div>
</div>
</div>";
}

}

else
{
$query = $pdo -> prepare("INSERT into guestfr(username, password, lastname, middlename, firstname, contactno, email) VALUES (:username, :password, :lastname, :middlename, :firstname, :contactno, :email)");

$query->bindParam(':username', $username);
$query->bindParam(':password', $password);/*md5($_POST['password'])*/
$query->bindParam(':lastname', $lastname);
$query->bindParam(':middlename', $middlename);
$query->bindParam(':firstname', $firstname);
$query->bindParam(':contactno', $contactno);
$query->bindParam(':email', $email);

$query->execute();

header('Refresh: 1;url=guest/guestlogin.php');

echo "<div id='dialog'>
<div id='dialog-bg'>
<div id='dialog-title'>Success!</div>
<div id='dialog-description'>Registration successful. You are now a member of Fox River Loyale</div>

<!-- Buttons, both options close the window in this demo -->
<div id='dialog-buttons'>
<a href='regform.php' class='large blue button'>Log in to Proceed</a>
</div>
</div>
</div>";

}



?>
</div>

eto po connection php ko po

<?php

$host = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "foxriverdb";

$pdo = new PDO("mysql:host=$host;dbname=$dbname", $dbusername, $dbpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));



?>


sir pwede po bang patulong ng easy iinject na password encryption ko dito sa code ko . Salamat po in advance
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga master :3 i need help ano ang gagawin ko para mka post ng grade sa isang SIS kind of php. at paano i update ito nlng kasi yung kulang ko sa choosen project ko :3 i can send to you my code and database help naman oh :3
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Tanong lang po saan po ba magandang magdownload ng mga free themes?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

tnx boss na solve ung prob ko dahil sayo
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Mga sir at master pa help naman po sa Contact form.html ko i need to make a form that has FULLNAME, EMAILADDRESS, MSG and submit btn. and my big problem is the php code that can send it to my Email address. wala po talaga akong alam pag dating sa php. Sana po may makatulong sakin ;( im using DWCS6.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

mga ser pwede po bang paturo ng registration and login form sa php? gusto ko kasing malaman kung panu gawin iyon ee.. pasensya na explorer lang po.. :) pa pm nalng if pwd? up up up
 
Back
Top Bottom