Jump to content

AlanB09

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by AlanB09

  1. wow thats some long coding lol ill give it a go cheers but i still want to know why my script not work lol
  2. so basically remove the html tags ? i tried that same result
  3. hy there, i have written a basic feedback form and script, and have checked over it, it should run :S but, alas, it doesnt mail to my account. any help much appreciated please. thanks Feedback Form: <html> <head> <title> Contact us </title> <body bgcolor="orange"> <center> </head> <body> <h1> Please Give Us Your Feedback</h1> <form name="feedback" action="sendfeedback.php"> Name: <br /> <input type="text" name="name"><br /> Email:<br /> <input type="text" name="email"><br /> Your Comments: <br /><textarea name="comments" rows="10" cols="30"> </textarea><br /> <input type="submit" name="submit" value="Submit"> </form> </body> </html> sendfeedback.php : <html> <head> </head> <body> <?php if (isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['comments']; mail( "angelus4angel@hotmail.co.uk" , "Feedback Form Results from VisualizationRicky", $message, "From: $name, $email" ); header( "Location: http://www.visualizationricky.com/index" ); } else { header( "Location: http://www.visualizationricky.com/index"); } } ?> </body> </html>
  4. **edit** problem solved... check syntax of table name ** okay to add to this yup changing the $result code got rid of that error, but now ive got something else lol ! ive looked it up , and tried what i can to sort it.. changing the name and things, but i keep getting this error Table 'a3866796_users.tb_userlists' doesn't exist im basically trying to access the table userlists and get a print of the output. pulling my hair out over here !
  5. okay apologies for my ignorance :$ and thanks , ill give it a go should the while ($db_field = mysql_fetch_assoc($result) ) { remain the same then? thanks again
  6. hi there, im running the following code to access my database and print out results but keep getting the message: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a3866796/public_html/databasetest.php on line 16 ive looked through and cant see any errors in my coding.. any suggestions please ? *i have edited out password/username/server detail for privacy. * many thanks <?php $username="private"; $password="private"; $database="private"; $server="private"; $db_handle= mysql_connect($server, $username, $password); $db_found = mysql_select_db($database, $db_handle); if($db_found) { $SQL="SELCT*FROM tb_a3866796_users"; $result = mysql_query($SQL); while ($db_field = mysql_fetch_assoc($result) ) { print $db_field['ID']."<br>"; print $db_field['username']."<br>"; print $db_field['password']."<br>"; print $db_field['datejoined']."<br>"; } mysql_close($db_handle); } else { print "Database not Found!"; mysql_close($db_handle); } ?>
  7. hi Im alan, and just started in this confusing myriad that is PHP. I have a decent background in HTML and some knowledge of CSS I'll probably annoy the hell out of the PHP Code Help section LOL but i may as well take advantage of the knowledge you all have so yeah.. thats about it glad to be here
  8. thank you .. i really didnt realise that was how it was meant to be :$ ill get there lol
  9. okay i have this form ... saved as feedback.html <html> <head> <title> Contact Us </title> <body bgcolor="orange"> <center> </head> <body> <!-- Sets up the Form --> <form name="contact" method="POST" action="contactmail.php" /> Your Name:<br /><input type="text" name="fullname" value="Fullname"/><br /><br /> Your Email:<br /><input type="text" name="email" value="Email" /> </form> <h2>Your Comments</h2><br /> <textarea name="comments" rows="15" cols="50" /> </textarea> <br /> <center><input type="submit" name="submit" value="Submit"> </body> </html> and i have this script.. saved as contactmail.php <html> <body> <?php $name = $_POST['fullname']; $email = $_POST['email']; $feedback = $_POST['comments']; echo "Thank You $name"; echo "Your feedback: $feedback"; echo "<br />"; echo "is much appreciated and has been sent to the webmaster"; echo "<b>We will be in touch soon. Namaste</b>"; ?> </body> </html> i cant see any problems with the script, but for some reason, when i click submit.... nothing happens :S what am i doing wrong ? any help much appreciated, thank you
  10. phpfan and oni thank you this is exactly what i need.. a sense of direction! ive gone over variables, operators, etc etc about 100 times, but i need direction lol! simple login in is the start.. next is how to redirect it to my webpage once logged in and im thinking i may need to write a register script lmao !! (uhoooh sql here i come too! )
  11. lol i know this is going to be really really useful which is why ive kept going but honestly ive been banging my head off a wall lmao !! i take it a login script like that wouldnt be very secure though ?
  12. thank you very much .. simple logic, i cant believe i didnt see that... i have to say every time i feel like im getting somewhere, i get confused and have to start all over again lol !
  13. hi there, im new to PHP and this is my attempt at a very basic login authentication. i can get the first 'IF' to run, but the else if doesnt seem to want to work LOL. i wonder if any one can help with this please? i will post the form first.. .. this is called test. <html> <head> <title> More on Variables</title> </head> <body> <form id="login" method="POST" action="logins.php"><br /> Username: <input type="text" name="user" value="user" /><br /> Password: <input type="password" name="password"" /><br /> <input type="submit" value="submit" name="Submit" /><br /> </form> </body> </html> and now the script.. in a file called logins.php <html> <body> <?php // Retrieves the username posted in the form and sets the password $password="Enter"; $username=$_POST['user']; if($username == "Alan" AND $password == "Enter"){ print("Welcome back $username"); } else if($_POST['user'] == "Mel" AND $password == "Laura"){ print("Access Granted, Hiya Pal"); } else { print("Access Denied"); } ?> </body> </html> once again, thank you for any help please keep very basic as i'm just beginning to get to grips with things.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.