-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
First question is why without javascript ? i don't think you can create a popup without javascript, create a calendar can be done but to make it look good, then php has nothing to do with that, the look'n'feel is down to HTML/CSS & JavaScript (and mabye alittle flash) PHP only really controls the contents.
-
OK from here, we're use the WHERE clause <?php //$VariableName = $_GET['VariablePassed']; $Acat = $_GET['Acat ']; //Acat being the form element name were passing #-------------------------------------------------------- //...snip...// #create the query - sets $sql to contain the required query //$sql = 'SELECT * FROM `Booking Database` ORDER BY `Booking Database` . `Price Cat` ASC LIMIT 0, 30'; $sql = 'SELECT * FROM `Booking Database` ORDER BY `Price Cat` WHERE `Price Cat` = $Acat LIMIT 0, 30'; ?>
-
Opps last code was wrong..! use $sql = "INSERT INTO `Booking Database` (`Customer Username`, `Booking ID`, `Customer Name`, `Check In`, `Check Out`, `Price Cat`, `Type Of Room`, `Password`) VALUES ( '$CustomerUsername', '$BookingID', '$CustomerName', '$CheckIn', '$CheckOut', '$PriceCat', '$TypeOfRoom', '$Password' )"; Still need to see the $CustomerUsername = $_GET[ and the CustomerUsername part of the form
-
change to $sql = "INSERT INTO `Booking Database` (`Customer Username`, `Booking ID`, `Check In`, `Check Out`, `Price Cat`, `Type Of Room`, `Password`) VALUES ( '$CustomerUsername', '$BookingID', '$CheckIn', '$CheckOut', '$PriceCat', '$TypeOfRoom', '$Password' )"; can you post the form and the $_GET['CustomerUsername'] part if this fails
-
Cool, but can you click topic solved
-
yeah htmlentities should be fine try this $reply_text = 'Hello "world" that will be £1.99 please for Fish & chips'; $reply_text = htmlentities ($reply_text, ENT_QUOTES); echo $reply_text; it should view like this but if you "view source" it will show this
-
try this $password = md5($_POST['password']); echo $password; and compare to the database Oh bugger i just thought.... how is the password field setup ? it should be char(32)
-
Not sure how its more secure ? but i do use POST for forms and GET for links.. if you do want this then change <form NAME="GetCode" ACTION="addcustomer.php" METHOD=get> to <form NAME="GetCode" ACTION="addcustomer.php" METHOD="POST"> and the $_GET in the php to $_POST EDIT: personally i would remove the spaces remember to update the php if you do
-
try viewing the source of the online page. its pretty secure.. depends what of protection your after..
-
if you have clear text passwords then first backup the database and then do this UPDATE members SET password = md5(password ); ONCE only run this once! or it will double encrypt
-
change $sql = "INSERT INTO `Booking Database` (Unique ID, Booking ID, Customer Name, Check In, Check Out, Price Cat, Type Of Room, Password) VALUES ( '$UniqueID', '$BookingID', '$CustomerName', '$CheckIn', '$CheckOut', '$PriceCat', '$TypeOfRoom', '$Password' )"; to $sql = "INSERT INTO `Booking Database` (`Unique ID`, `Booking ID`, `Customer Name`, `Check In`, `Check Out`, `Price Cat`, `Type Of Room`, `Password`) VALUES ( '$UniqueID', '$BookingID', '$CustomerName', '$CheckIn', '$CheckOut', '$PriceCat', '$TypeOfRoom', '$Password' )"; also your not getting the data, read my last post
-
update the $CID to the names $UniqueID= $_GET['Unique ID']; echo( "Unique ID = <B>$UniqueID</B></br>" ); $BookingID= $_GET['Booking ID']; echo( "Booking ID = <B>$BookingID</B></br>" ); etc etc now update the $SQL $sql = "INSERT INTO `Booking Database` (Unique ID, Booking ID, Customer Name, Check In, Check Out, Price Cat, Type Of Room, Password) VALUES ( '$UniqueID', '$BookingID', etc etc etc )"; EDIT: update mysql_query($sql,$conn); to mysql_query($sql,$conn)or die(mysql_error());
-
Selecting the maximum value (MySQL query help)
MadTechie replied to bachx's topic in PHP Coding Help
does seam weird.. maybe posting a small DB dump -
No real idea but.. some shots in the dark.. try sharing the printer and connecting to the share point maybe use the Parallel port to "printer_get_option" and then set them when connected via USB,
-
lol my bad, atleast you get the idea.. i find using an array is a little more useful.. as you have more control with the text at a later stage
-
how about this ? sorry for formatting (edited direct) <?php class singUp{ private $email; private $password; private $password2; var $errors = array(); function __construct($email,$password,$password2){ $this->email = $email; $this->password = $password; $this->password2 = $password2; } function checkEmail(){ $check="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})"; if(!eregi($check,$this->email)){ $errors[] = "Please check your email"; return false; } } function checkPassword(){ if(($this->password || $this->password2)=='') { $errors[] = "passwords empty"; return false; }elseif($this->password != $this->password2){ $errors[] = "passwords do not match"; return false; }elseif(strlen($this->password)<6){ $errors[] = "Sorry your password is too short"; return false; } } } } if(isset($_POST['Submit'])){ $singup =new singUp($_POST['email'],$_POST['password'],$_POST['password2']); $X = $singup->checkEmail(); //X= isemail valid $X =$singup->checkPassword(); //X= password valid //Show Errors print_r($singup->errors); } ?>
-
READ IT... it explains it all, if your learning you need to learn not just copy and paste.. if your not learning.. ask someone to do it for you (freelance section), if you don't understand feel free to ask.. after a quick look, you want from "To the Core of the Script" to "Ensuring Valid Session Data" in one file, the others your need to read them to understand it!
-
Selecting the maximum value (MySQL query help)
MadTechie replied to bachx's topic in PHP Coding Help
I have to ask but, how do you know that? as you sure the file is "name" ? EDIT: its possible theirs 2 rows with the same balance -
If your reading this assume you can read the article itself. what do you need help with ? Its in chunks ctrl+c ctrl+v