Jump to content

soupy127

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

soupy127's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks alot again for all your help, your a life saver!!
  2. getting this error 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:\wamp\www\Final\adminbookingform.php on line 88 Message sent think it might go away when i upload it to my website, hopefully that will fix the problem !
  3. really sorry chum, but still nothing ! thanks alot again for your help.
  4. thanks very much for your reply, I copy and pasted your code and nothing seemed to happen, i entered a test email address which is my own and it didnt seem to do anything ! thanks for your help again
  5. I have this form set up <form action="emailbooking.php" method="send"> <table> <tr> <td>Name:</td> <td> <input type="text" name="name" value="" maxlength="100" /></td> </tr> <tr> <tr><td>To:</td> <td><select name="email"> <option value ="info@royalportrushgolfclub.com">Royal Portrush Golf Club</option> <option value ="golf@royalcountydown.org">Royal County Down Golf Club</option> <option value ="bill@portstewartgc.co.uk">Portstewart Golf Club</option> <option value ="moyolapark@btconnect.com ">Moyola Park Golf Club</option> <option value ="info@belvoirparkclubhouse.co.uk">Belvoir Park Clubhouse</option> <option value ="info@castlerockgc.co.uk">Castle Rock Golf Club</option> <option value ="info@ardglassgolfclub.com">Ardglass Golf Club</option> </select></td> <tr><td>From(Email Address): </td> <td> <input type="text" name="emailfrom" value="" maxlength="200" /></td> </tr> <tr><td>Subject: </td> <td> <input type="text" name="subject" value="" maxlength="75" /></td> </tr> <tr> <td>Query:</td> <td> <textarea rows="3" cols="20" name="query"></textarea></td> </tr> <tr><td> </td> <td> <input type="submit" value="Send" /></td> </tr> </table> just wandering how I can make the from send to whatevery email address the user selects from the drop down menu?? any ideas, any help would be greatly appreciated !! thanks
  6. Thanks alot for your help i just got it working there ! thanks again! oh just one more question while im logged on, how would i go about creating a dropdown list, that would be populated by the usernames from my users table, so that when the admin selects the username from the dropdown table it will display their results ? and can it be linked with another another drop down men (i.e. name of course?) im not to sure how to use the join function !
  7. sorry im abit of a noob when it comes to php haha, should echoing the data again after it has been submitted update the database ?
  8. I have an updatemember.php, and updatemember2.php. the first updatemember.php calls the info from the database using the session function and displays it into a form where the user can enter the details. Once the user is happy he clicks the update button which updatemember2.php is susposed to update in the database but it is currently just saying record updated but doesnt change the values in the database ? here are the scripts below. please help ! updatemember.php <?php session_start(); if (isset($_SESSION['username'])) { //the username exists echo "Welcome, ".$_SESSION['username']."!<br> <a href='logout.php'>Logout</a>"; } else die("Sorry but you must be logged in to view this Area"); ?> <?php $con = mysql_connect("localhost", "root", ""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("duffers", $con); $result = mysql_query("SELECT * FROM users WHERE username = '$_SESSION[username]'"); while($row = mysql_fetch_array($result)) { $x1 = $row['username']; $x2 = $row['name']; $x3 = $row['contactnumber']; $x4 = $row['email']; $x5 = $row['handicap']; } mysql_close($con); ?> <form method="post" action="updatemember2.php"> Username: <input type="text" name="username" value="<?php echo $x1; ?>"> <br> Name: <input type="text" name="name" value="<?php echo $x2; ?>"> <br> Contact Number: <input type="text" name="contactnumber" value="<?php echo $x3; ?>"> <br> Email: <input type="text" name="email" value="<?php echo $x4; ?>"> <br> Handicap: <input type="text" name="handicap" value="<?php echo $x5; ?>"> <br> <br><input type="submit" value="Update"> </form> and updatemember2.php <?php session_start(); if (isset($_SESSION['username'])) { //the username exists echo "Welcome, ".$_SESSION['username']."!<br> <a href='logout.php'>Logout</a>"; } else die("Sorry but you must be logged in to view this Area"); ?> <?php $con = mysql_connect("localhost", "root", ""); $username =$_POST['username']; $name =$_POST['name']; $contactnumber =$_POST['contactnumber']; $email =$_POST['email']; $handicap =$_POST['handicap']; if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("duffers", $con); mysql_query("UPDATE users SET username = '$_POST[username]', name = '$_POST[name]', contactnumber = '$_POST[contactnumber]', email = '$_POST',handicap = '$_POST[handicap]' WHERE username = '$_POST[username]'"); echo "Record updated!"; mysql_close($con); ?>
  9. Have 2 problems that i am currently having trouble with and i have to have these sorted by monday so stressing out, the first is I have a table called users and a table called courses (golf courses) so goin to make a results table combining both so that it can display the users result for that specific course. Wanting to have on the webpage 2 list boxes so that the admin can select the user from the first list and then select the course from the second list and then it will display the users result for that course? just wandering how i would go about doing this... the 2nd question is that I have put the website up on to a free hosting website and they gave me a connect url for phpmyadmin so that my database will work with the site, but when the php scripts are coming up duffers.users table does not exist? (duffers being the name of the database and users being the name of the table) but it seems like it is connecting to the database but just isnt recognising the tables :S any ideas? PLZZZZ Help im desperate haha. it will be greatly appreciated.
  10. Thanks for your reply Ken2k7 ! Im going to change of the variables tonight to see if it works and use that code you provided for the php self, and i will report back what happens ! hopefully it will work ok. thanks very much again !
  11. Hello there ! I am currently designing a golf website for my final year project. What i am hoping to do is have is 2 drop down lists, one with the golfers names and the other with the name of the course (both of these list will be fed from the mysql database). then i want the user to be able to hit submit and it displaying that golfers results for that course? any ideas how i would go about structuring the databases? and how i would go about coding the query?? any help would be greatly appreciatied as i dont even know were to start ! haha please help thanks
  12. here is also the database code to set up the table, if anyone wants to try it for themselves ! [attachment deleted by admin]
  13. soz that was the wrong class.file, as i have been trying to edit that one. here is the orignal, sorry again. I think the script itself should be ok as I think a few people on this site have it working, just not working for me for some reason :S haha i tried changing if($_POST['user']){ $user=$_POST['user']; to if(!empty($_POST['user'])){ $user = empty($_POST['user']); and the undefined error for user went away, should i do this for each of the variables? or is that coding wrong ! [attachment deleted by admin]
  14. yep have indeed ! I used the sql file that came with it ! Heres the code hope this helps [attachment deleted by admin]
  15. Hello there ! I am currently designing a golf website for my final year project. What i am hoping to do is have is 2 drop down lists, one with the golfers names and the other with the name of the course (both of these list will be fed from the mysql database). then i want the user to be able to hit submit and it displaying that golfers results for that course? any ideas how i would go about structuring the databases? and how i would go about coding the query?? any help would be greatly appreciatied as i dont even know were to start ! haha please help thanks
×
×
  • 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.