
blink359
Members-
Posts
169 -
Joined
-
Last visited
Never
Everything posted by blink359
-
Hello, I am making a form for in which people will enter there name adress etc and then upload an image to the form which they will want canvassed, the form must then email every field and the picture to the recepitent. but i dont know how to do the image part. here is what i have so far <form> <p>Full Name:<br /> <input type="text" name="name" border="1" /><br /> Address:<br /> <input type="text" name="address" border="1" /><br /> County:<br /> <input type="text" name="county" border="1" /><br /> Post Code:<br /> <input type="text" name="postcode" border="1" /><br /> Phone Number:<br /> <input type="number" name="phone" border="1" /><br /> Paypal Email:<br /> <input type="email" name="email" border="1" /> </p> <p>Size:</p> A3 Approx. 10" x 14" £21.99 <input type="radio" name="size" value="A3"/><br /> A2 Approx. 16" x 20" £25.99 <input type="radio" name="size" value="A2" /><br /> A1 Approx. 20" x 30" £29.99 <input type="radio" name="size" value="A1" /><br /> A0 Approx. 30" x 45" £69.99 <input type="radio" name="size" value="A0" /><br /> <br /> Image:<br /> <br /> <input type="submit" /> </p> </form> <p>If you If you can help or give me the adress of a website that has the information i need it would be much appriciated. Thanks, Blink359
-
Hello i am looking to make a menu that uses the basic buttons that i have made already i have a script that makes them change when the mouse scrolls over them (From light blue to dark blue), and am now looking for a script that allows when the mouse scrolls over one of the menu boxes it drops another few boxes down underneath it i am using a horizontal menu bar. If anyone can help me or show me a place to read on how to do it i would be very greatfull. Here is an example underneath On mouse over Home Trips menu 1 etc etc sub menu 1 sub menu 2 etc Thanks all Blink359
-
I have a website with a form that i want the data to be emailed to me when they submit, I have got this done but the slight issue is that when someone views the web page it believes they have submitted and then emails me a blank email and i dont know what is wrong please can someone help <form> <p><label for="name">Name:</label><br /> <input type="text" name="name" id="name" value="" /> </p> <p>Message Type</p> <p><select name="type"> <option value="webprob">Website Problem</option> <option value="sugguest">Suguestion</option> <option value="feedback">Feedback</option> </select> </p> <p><label for="message">Message:</label><br /> <textarea cols="60" rows="11" name="message" id="message"></textarea><br /></p> <p><input type="submit" class="formbutton"/> <p> <?php // Receiving variables @$name = addslashes($_GET['name']); @$type = addslashes($_GET['type']); @$message = addslashes($_GET['message']); // Validation if (strlen($name) <0) { die("<p align='center'><font face='Arial' size='3' color='#000000'>Please complete all the required fields</font></p>"); } if (strlen($name) >20) { die("<p align='center'><font face='Arial' size='3' color='#000000'>Please complete all the required fields</font></p>"); } //Sending Email to form owner $pfw_header = "From: $name\n" . "Reply-To: $name\n"; $pfw_subject = "Website Feedback"; $pfw_email_to = "My email address"; $pfw_message = "name: $name\n" . "type: $type\n" . "message: $message\n" @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ; echo("<p align='center'><font face='Arial' size='3' color='#000000'>Your form has been submitted and will be evaluated soon.</font></p>"); ?> </form></p> Many thanks Nathan
-
is it possible to make a php script that looks up a website and returns and echos the IP address of that website if you can help that would be great thanks
-
In a table i have the collums ID and text the id is a number. i want to echo on my main page the latest 5 but induvidually so you will have Latest one next latest next latest etc If you can help that would be great Thanks Blink359
-
Dont need to remove user + pass its included in config.php <?php include('config.php'); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); $success = true; $problemMessage = ""; if (isset($_POST['Submit'])) { $user = isset($_POST['user'])?$_POST['user']:false; $pass = isset($_POST['pass'])?$_POST['pass']:false; $pass2 = isset($_POST['newpass'])?$_POST['pass2']:false; $pass2 = isset($_POST['newpass2'])?$_POST['pass2']:false; if(!$user || !$pass ||!$newpass || !$newpass2); { $problemMessage = "Please fill in all required data"; $success = false; } if($newpass != $newpass2) { $problemMessage .= "Your passwords do not match <br />"; $success = false; } if(strlen($newpass2) < 5) { $problemMessage .= "Your password must be more than 5 characters<br />"; $success = false; } if(strlen($newpass2) > 20) { $problemMessage .= "Your password cannot be longer than 20 characters <br />"; $success = false; } $result = mysql_query("SELECT * FROM `accounts` where login='$user' AND password='$pass'") or die(mysql_error()); { if (empty($result)) return 'Invalid username or password'; else { $sql = "UPDATE accounts SET password = '$newpass' WHERE username = '$user' and password = '$pass';"; $result = mysql_query($sql); if (empty($result)) return mysql_error(); } ?> <html> <head> <title>Password Change</title> </head> <body <form action="" method="post" Username: <input type="text" name="user"> <br> Password: <input type="password" name="pass"> <br> New Password: <input type="password" name="newpass"> <br /> Repeat New Password: <input type="password" name="newpass2"> <br /> <input name="Submit" type="submit" value="submit"> <imput name="reset" type="reset" value="reset"> </form> </body> </html>
-
</form> </body> </html> I dont think its much help tho
-
How can i goabout the it im quite newbie to this But also this website is gonna be used amongst a few other people as its ment to interact with a database for a private emulator of a game
-
Parse error: syntax error, unexpected $end in /var/www/nathan/wotlk/passchange.php on line 69 line 69 = </html> ive had this before but i cant remember what was wrong
-
What your ment to post is that info to go into the mysql query $sql = "UPDATE accounts SET password = '$newpass' WHERE username = '$user' and password = '$pass";"; Line 52 <input name="user" type="text"/>
-
I copied it from another page as i forgot what the actual code was so i copied it from my register page which is working fine
-
Parse error: syntax error, unexpected T_STRING in /var/www/nathan/wotlk/passchange.php on line 52 which is aparently my actual form <form name=myform method=post action=''> <input name="user" type="text"/> <br> Password: <input name="pass" type="password"/> <br> New Password: <input name="newpass" type="password"/> <br> Repeat New Password: <input name="newpass2" tpye="password"/> <br /> <input name="Submit" type="submit" value="submit" /> <imput name="reset" type="reset" value="reset" /> </form>
-
Kk guys thanks for that i may be posting later if im having problems with other pages since i wrote pages that all worked now i can use them like that so im having to recode them
-
What needs editing then im newbie remember im trying to learn also its this now $result = mysql_query("SELECT * FROM `accounts` where login='$user' AND password='$pass'") or die(mysql_error()); { if (empty($result)) return 'Invalid username or password'; else { $sql = "UPDATE accounts SET password = '$newpass' WHERE username = '$user' and password = '$pass";"; $result = mysql_query($sql); if (empty($result)) return mysql_error(); }
-
So this should work $result = mysql_query("SELECT * FROM `accounts` where login='$user' AND password='$pass'") or die(mysql_error()); { if (empty($result)) return 'Invalid username or password'; else { $sql = "UPDATE accounts SET password = '$newpass' WHERE username = '$user' and password = '$pass";"; $result = mysql_query($sql); if mysql_num_rows($result)==0 return mysql_error(); }
-
I have this code im writing and i want to make it so if this query $result = mysql_query("SELECT * FROM `accounts` where login='$user' AND password='$pass'") Comes back false it comes back with the error "Invalid username or password" if it comes back true it goes on to do a mysql update which would be "UPDATE accounts SET password = '$newpass' WHERE username = '$user' and password = '$pass"; and if that doesnt work it just gives the mysql error If someone could help me do this that would be great Thanks Blink359
-
Right being new to PhP i dont know where and how to find out how to stop a script properly if i had a mysql query i want to know how to check if its done its job and if not how to display the appropriate problem message. At the moment i want to do this for a mysql select command, a mysql update command and a mysql insert command example if($success); { $query = "SELECT `login` FROM `accounts` WHERE login='$login' AND password='$pass'"; $result=mysql_query($query); if that doesnt work it echos invalid username or password $query = "UPDATE accounts SET flags = '".$flag."' WHERE login = '".$user."';"; $result = mysql_query($query) if that works it echos something if it doesnt work it echos something else $result = mysql_query("INSERT INTO `accounts` VALUES ('', '$user', '$pass2', '', '', '0', '9', '', '', '$flag', 'enUS', '0', null);") if that works it echos something if not something else but if they dont do what there ment to the end maby a die involved or something? Thanks Blink359
-
Please can you recommend some i think its selecting the record where the user = $user from the form and $pass = pass Whats the best way to learn PhP at a newbie stage aswell?
-
I was wondering what is the code for a mysql query to look in a database to see if it can find in the table 'accounts' where login = $user and password = $pass and if it cant it says invalid username or password thanks
-
[SOLVED] Storing database info in another file
blink359 replied to blink359's topic in PHP Coding Help
kk thanks -
[SOLVED] Storing database info in another file
blink359 replied to blink359's topic in PHP Coding Help
Im sure hang on ill just try it all again see if it was a one off or something -
I wanted to store my database info in another file lets say config.php so i put my db info in like so <?php $dbhost = "localhost"; //database host goes here $dbuser = "your_user"; //database user goes here $dbpass = "your_password"; //database password goes here $dbname = "logon"; //database name goes here ?> and in the page i want to include it i put include("config.php"); But when i went on the page i used the include it had just echoed my database info on the page what have i done wrong
-
Right thanks guys i got that work now to test it on other peoples computers
-
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/nathan/wotlk/register.php on line 93 if ($success) { echo "Valid New Account Entry<br />"; $result = mysql_query("INSERT INTO `accounts` VALUES ('', '$user', '$pass2', '', '', '0', '9', '', '', 'flag', 'enUS', '0', null);") or die("Error: (" . mysql_errno() . ") " . mysql_error()); $row = mysql_fetch_array( $result ); } }