
bigrossco
Members-
Posts
64 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
bigrossco's Achievements

Member (2/5)
0
Reputation
-
i tried adding <form action=contacts.php method=post> but it redirects to the page contacts.php but the message is not emailed now, which it needs to do
-
ok next question for my contact page, I want the contact form below, to redirect to a confirmation page after submit is selected so users know the message has sent <fieldset> <legend>Contact Form</legend> <p><label>Name:</label> <input name="name" type="text" id="name" size="40"> </p> <p><label>Email:</label> <input name="email" type="text" id="email" size="40"> </p> <p> <label>Message:<br /> </label><textarea name="comments" cols="50" rows="10" id="comments"></textarea> </p> <p><input type="submit" name="submit" id="submit" value="Send Message"></p> </fieldset> </form> <?php # Add your email address $to = '[email protected]'; # Add a default subject $subject = 'Blairlogie-Scotland.org Message'; $name = $_REQUEST['name']; $email = $_REQUEST['email']; $comments = $_REQUEST['comments']; $submit = $_REQUEST['submit']; $headers = "From: $email\n"; $headers .= "Reply-To: $email\n\n"; $body = "A new message has been posted by: $name \n Email address: $email \n Message: $comments \n\n To reply to this message simply click on REPLY"; if(isset($submit)) { mail($to, $subject, $body, $headers);} ?>
-
thank you very much, that has done the trick Ross
-
I have the contact form below, but what I am wanting to do is make the input email address by the user, appear as the FROM address in the emails that are sent to the specified address: <form method="post" action="<?php echo($PHP_SELF) ?>"> <fieldset> <legend>Contact Form</legend> <p><label>Name:</label> <input name="name" type="text" id="name" size="40"> </p> <p><label>Email:</label> <input name="email" type="text" id="email" size="40"> </p> <p> <label>Message:<br /> </label><textarea name="comments" cols="50" rows="10" id="comments"></textarea> </p> <p><input type="submit" name="submit" id="submit" value="Send Message"></p> </fieldset> </form> <?php # Add your email address $to = '[email protected]'; # Add a default subject $subject = 'New Message Recived'; $name = $_REQUEST['name']; $email = $_REQUEST['email']; $comments = $_REQUEST['comments']; $submit = $_REQUEST['submit']; $body = "$name $email $comments"; if(isset($submit)) { mail($to, $subject, $body);} ?></
-
i want the drop down box to refer to the coloum on the database i.e. id, phone number, name and the text box to refer to the input
-
got it working thanks but now a bit more advanced thing i am wanting to work I have 1 input and 1 dropdown box, when a user clicks submit it shouild go to a page where it shows data from a mysql database from the data from the input where its equal to the selected item on the dropdown this is the code i have : $query = "SELECT * FROM clients WHERE '".$_SESSION["method"]."' = '".$_SESSION["search"]."'"; for the sql quiry, when i chose method as ID it dont work but when i change the code to: $query = "SELECT * FROM clients WHERE id = '".$_SESSION["search"]."'"; and but the id as search it dose work :S any ideas? i think its something to do with where i have '".$_SESSION["method"]."' i do have <?php <?php $_SESSION['method']; if (isset ($_GET['method'])){ $_SESSION['method'] = $_GET['method']; } $_SESSION['search']; if (isset ($_GET['search'])){ $_SESSION['search'] = $_GET['search']; } ?> at the header
-
ok makes sence for the text input to a field, I want it to redirect to another page with that variable i.e. result.php?id=inputfield1 how would i do this?
-
thanks how would i get the search box to pass the inputed text into the '$search_query' variable
-
Hi I am wanting to make a search box that will search the input data from the database. What I am wanting is to be able to enter a client id number i.e 2001 and it will display the information for that client. I used to have the code to do this but sadly lost it All I am wanting is one search box on a page to input the number and when you click submit it shows the users info. Thanks Ross
-
I am wanting the code below to be emailed to a specified email address (was told to check the php help forum for a server-side script?) Any help will be most greatfull R <form> Name:<br> <input type="text" name="name" value="Name" size="20"> <br> Contact Number:<br> <input type="text" name="number" value="Phone Number" size="20"> <br> Email Address:<br> <input type="text" name="mail" value="Email Address" size="20"> <br> <script language="javascript"> var disable_empty_list = true; </script> <script language="javascript" src="chainedselects.js"></script> <script language="javascript" src="content_link.js"></script> <script language="javascript"> function openLink(url) { if (url != "") { location.href = url; } else { alert("Please select a car make / model"); } } </script> </head> <body onload="initListGroup('links', document.forms[0].category, document.forms[0].site);"> <table align="left" cellpadding="0" cellspacing="0" border="0" width="90%"><tr><td> <form> Make: <br> <select name="category" style="width:180px" name="make"></select> <br> Model: <br> <select name="site" style="width:180px" name="model"></select> </form> </td></tr></table> <br><br><br><br><br><br><br><br> Additional Requirments:<br> <textarea rows="10" cols="30"> </textarea> <br><br><br> <input type="submit" value="Send">
-
I have the form below and want it to email what is input to a specified address but unsure of how to do this Thanks, Ross <form> Name:<br> <input type="text" name="name" value="Name" size="20"> <br> Contact Number:<br> <input type="text" name="number" value="Phone Number" size="20"> <br> Email Address:<br> <input type="text" name="mail" value="Email Address" size="20"> <br> <script language="javascript"> var disable_empty_list = true; </script> <script language="javascript" src="chainedselects.js"></script> <script language="javascript" src="content_link.js"></script> <script language="javascript"> function openLink(url) { if (url != "") { location.href = url; } else { alert("Please select a car make / model"); } } </script> </head> <body onload="initListGroup('links', document.forms[0].category, document.forms[0].site);"> <table align="left" cellpadding="0" cellspacing="0" border="0" width="90%"><tr><td> <form> Make: <br> <select name="category" style="width:180px" name="make"></select> <br> Model: <br> <select name="site" style="width:180px" name="model"></select> </form> </td></tr></table> <br><br><br><br><br><br><br><br> Additional Requirments:<br> <textarea rows="10" cols="30"> </textarea> <br><br><br> <input type="submit" value="Send">
-
as in first post its calander i tried adding $result = mysql_query($query) or die("Error ". mysql_error(). " with query ". $query); the message i get is Error Query was empty with query
-
still get the same message
-
i get the message Error in query: . Query was empty when i do your code
-
I have the code below but would like to modify it so it will sort the output by the date Thanks r <?php $host = "$lang_dbhost"; $user = "$lang_dbuser"; $pass = "$lang_dbpass"; $db = "$lang_dbase"; // open connection $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); // select database mysql_select_db($db) or die ("Unable to select database!"); $query = "SELECT id, DATE_FORMAT(date,'%d/%m/%Y'), time, tech, description FROM calander"; // execute query $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); ?> <form method="post"> <?php if (mysql_num_rows($result) > 0) { echo"<table border = 1>"; while($row = mysql_fetch_row($result)){ echo"<tr>"; echo"<td><b>Date: </b>".$row[1]." <b>Time: </b>".$row[2]." <b>Staff: </b>".$row[3]." <a href=\"./update-appoint.php?id=".$row[0]."\">$lang_update</a> <a href=\"./delete-appoint.php?id=".$row[0]."\">$lang_delete</a> </b></td>"; echo"</tr>"; echo "<td>" . $row[4]."</td>"; //echo"</table>"; } } else { echo"<b>Their is currently no appointments</b>"; } ?>