No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
[code=php] <?php $conn = mysql_connect("localhost", "root", "dotherz"); //connecting to database if($conn) //testing if the connection was stablished { mysql_select_db("orders", $conn); //selecting database from your localhost $qry = "SELECT * FROM customer WHERE customerId = 1"; //the query to get the first user $result = mysql_query($qry); //executing the qry and passing …
[code=php] <?php include("C:/xampp/htdocs/mySalon/connect_database.php");?> <?php if(isset ($_POST ['username']) && $_POST ['password']){ $username = $_POST['username']; $password=$_POST['password']; $query=mysql_query("SELECT * FROM admin WHERE username='$username'"); $numrows=mysql_num_rows($query); if ($numrows!=0) { while ($row=mysql_fetch_assoc($query)) { $dbusername=$row['username']; $dbpassword=$row['password']; } //check to see if they match! if ($username==$dbusername&& md5 ($password)==$dbpassword) { header ('Location: http://localhost/mySalon/admin/admin_page.php'); $_SESSION['username'] = $username; } else echo …
[code=php] <?php session_start(); if (isset($_POST['submit'])) { // clean and check form inputs including the secure image code $name = trim(strip_tags($_POST['name'])); $email = trim(strip_tags($_POST['email'])); $comments = trim(strip_tags($_POST['comments'])); $secure = strtoupper(trim(strip_tags($_POST['secure']))); $match = $_SESSION['captcha']; // the code on the image // input error checking if ($name=="") { $err.= "Please provide your name<br/>"; …
I have similar problem like this .. would someone correct my code..thanks a lot : ) <?php include("C:/xampp/htdocs/mySalon/connect_database.php"); ?> <?php session_start(); if (isset ($_POST['submit'],$_POST['completeName'],$_POST ['mobileNumber'],$_POST ['emailAddress'],$_POST ['date'],$_POST ['time'],$_POST['servicesHairID'],$_POST['termsCondition'])) { $submit = $_POST['submit']; //form data $completeName = mysql_real_escape_string ($_POST ['completeName']); $mobileNumber = mysql_real_escape_string ($_POST ['mobileNumber']); $emailAddress = mysql_real_escape_string ($_POST ['emailAddress']); $date …
The End.
wonderlhily