Jump to content

anton_1

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Everything posted by anton_1

  1. Hey guys, This has been driving me crazy all day. It wont process Any Ideas? <?php mysql_connect('localhost', 'web101-db1-1', 'mypassword'); mysql_select_db('web101-db1-1'); $username = $_POST['username']; $password = $_POST['password']; $sql="INSERT INTO regme (id, username, password) VALUES ('NULL','$username','$password')"; $result = mysql_query($sql); if(!$result) { { die('Error: ' . mysql_error()); } else { echo "<p>Done!.</p>"; } } ?> thanks guys
  2. It worked! Thank you so much! the smtp settings are automatically set through your web-hosting provider
  3. Thanks guys for all your help. will try uploading it to my web-hosting just now Thanks!
  4. Is it my ISP host I contact or the company that provided me with the web-hosting and domain? Thanks!
  5. ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost would i change that to smtp.tools.sky.com? Thank again!
  6. <html> <head> </head> <?php mail("08006925@live.napier.ac.uk", "TEST", "Please work!", "From:phpgeeks@academy.com"); ?> <body> </body> </html>
  7. Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\mail\mail.php on line 9 Thanks man!
  8. Thanks guys, It was really just to allow people to contact me through a web form. whats a good smtp server to download? Thanks!
  9. Hey guys, Do you have any good articles that I could read to setup my own mail server how to connect to one to allow people to contact me through my web form on my website. Any Help would be greatly appreciated! Thank You!
  10. Im having bother setting up a contact form. how easily can this be done. How do I set up my mail server, any tips and hints? Any help would be appreciated. What I'm working on just now: Error Message - Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\mail\processmail.php on line 12 <html> <body> <form method="POST" action="processmail.php"> <input type="text" name="name" size="19"><br> <br> <input type="text" name="email" size="19"><br> <br> <textarea rows="9" name="message" cols="30"></textarea> <br> <br> <input type="submit" value="Submit" name="submit"> </form> </body> </html> <?php if(isset($_POST['submit'])) { $to = "08006925@live.napier.ac.uk"; $subject = "Form Tutorial"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; echo "Data has been submitted to $to!"; mail($to, $subject, $body); } else { echo "blarg!"; } ?>
  11. You can log in as user or admin rights such as edit insert and delete? Thanks
  12. Does anyone know any good php login systems that have admin rights? Any recommendations would be greatly appreciated thanks!
  13. Thanks Muddy_Funster that was it. dont think it knew which array to look at correct? Thank you also guys for your help!
  14. previous page: <html> <head> <title>Retrieve data from the database</title> </head> <body> <ul> <?php include 'dbconnect.php'; // SQL query $strSQL = "SELECT * FROM people ORDER BY FirstName DESC"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); // Loop the recordset $rs while($row = mysql_fetch_array($rs)) { // Name of the person $strName = $row['FirstName'] . " " . $row['LastName']; // Create a link to person.php with the id-value in the URL $strLink = "<a href = 'person.php?id = " . $row['id'] . "'>" . $strName . "</a>"; // List link echo "<li>" . $strLink . "</li>"; } // Close the database connection mysql_close(); ?> </ul> </body> </html> Thanks guys!
  15. ERROR MESSAGE Notice: Undefined index: id in C:\xampp\htdocs\Again\person.php on line 12 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Again\person.php on line 16 Return to the list <html> <head> <title>Retrieve data from database</title> </head> <body> <dl> <?php include 'dbconnect.php'; // Get data from the database depending on the value of the id in the URL $strSQL = "SELECT * FROM people WHERE id=" . $_GET["id"]; $rs = mysql_query($strSQL); // Loop the recordset $rs while($row = mysql_fetch_array($rs)) { // Write the data of the person echo "<dt>Name:</dt><dd>" . $row["FirstName"] . " " . $row["LastName"] . "</dd>"; echo "<dt>Phone:</dt><dd>" . $row["Phone"] . "</dd>"; echo "<dt>Birthdate:</dt><dd>" . $row["BirthDate"] . "</dd>"; } // Close the database connection mysql_close(); ?> </dl> <p><a href="list.php">Return to the list</a></p> </body> </html> Thank you in advance for any help! MOD EDIT: code tags added.
×
×
  • 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.