Jump to content

alohatofu

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

alohatofu's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, The code below will make it 2 step conditional. How can I add a 3rd step or a 4th step? Thanks <script language="JavaScript1.2"> function selectCombo() { var aa; var s,ss; var s = myForm1.selectitem1.value; ss = s.split("&"); for (i = 0; i < ss.length ; i++) { myForm1.selectitem2.options[i].text = ss[i]; } } </SCRIPT> <form name=myForm1 > <SELECT id=selectitem1 name=selectitem1 style="HEIGHT: 20px; LIST-STYLE: square; WIDTH: 155px" dataFld="" onChange=selectCombo()> <option value= Item1-1&Item1-2&Item1-3>Item 1</option> <option value= Item2-1&Item2-2&Item2-3>Item 2</option> <option value= Item3-1&Item3-2&Item3-3>Item 3</option> </select> <SELECT id=selectitem2 name=selectitem2 style="HEIGHT: 20px; LIST-STYLE: square; WIDTH: 155px" dataFld="" > <OPTION value=>Item1-1</option> <OPTION value=>Item1-2</option> <OPTION value=>Item1-3</option> </select> </form>
  2. Right, but what I'm trying to achieve is that when the user submit, the form process via the formmail <form method="POST" action="http://webapps/mailer/submitform" name="mail_form"> and it's emailing the form to a user. then redirect the user to a page. right now I got everything working except it does not carry the message over to the new page. I even did this <input type="hidden" name="redirecturl" value="http://mywebpage/abc/<?php echo "pagingtestconfirm.php?message=$POST_['message']&itemId=$itemId&memberId=$memberId"; ?>>
  3. I'm still not sure what you mean by that. Where do i insert that code to? what what does it do?
  4. My form <form method="POST" action="http://directory_to_formmail/submitform" name="mail_form"> <input type="hidden" name="mailto" value="myemail@email.com"> <textarea name="message" wrap=physical cols=23 rows=4></textarea> <input type="submit" value="Send"> <input type="reset" value="Clear"> <input type="hidden" name="redirecturl" value="http://myweb.com/redirect.php> when the user submitted and redirected to redirect.php, I would like to display the $message. on redirect.php I have $body = $_POST['message']; echo $body; but it does not work
  5. I'm using a formmail - which upon submission, process a form, then redirect them to a php page that I created. How do I go about in post whatever message the user submitted on that form?
  6. <?php $eric = $_REQUEST['eric']; //eric number $users = $_REQUEST['cuoos']; //number of customers out of service $mailsubj = $_REQUEST['clli']; //clli code $emailfrom = $_REQUEST['email']; //email address of user $pagesender = $_REQUEST['pagesender']; //email address of sender $statusDate = $_REQUEST['statusDate']; //creation date of event $now = time(); //time now in seconds $timestart = strtotime($statusDate); //convert start time to seconds $secsago = $now - $timestart; //in seconds $hoursago = (($secsago/60)/60); //result in hours with decimals echo $timestart; ?> <div align="left"> <tr> <td align="left" valign="top"> <p> </p><br><br><br><br> <form method="POST" action="http://webapps/mailer/submitform" name="mail_form"> <input type="hidden" name="mailto" value="myoh@dayiz.com"> <input type="hidden" name="order" value="out,users,message"> <input type="hidden" name="doublespace" value="no"> <input type="hidden" name="emailfrom" size="30" value="<?php echo $pagesender; ?>"> <input type="hidden" name="mailcc" value="<?php echo $emailfrom; ?>;<?php echo $pagesender; ?>" <input type="hidden" value="OUTAGE <?php echo $mailsubj; ?> - ERIC <?php echo $eric; ?>" name="mailsubj" name="mailsubj" size="20"><br> <input type="hidden" value="<?php echo $users; ?>" name="users" size="4"> <textarea name="message" wrap=physical cols=23 rows=4></textarea> <script> displaylimit("document.mail_form.message","",80) </script> <br> <input type="submit" value="Send" onclick="javascript:document.forms[0].mailcc.value=document.forms[0].emailfrom.value"> <input type="reset" value="Clear"> <input type="hidden" name="redirecturl" value="sendpageconfirm.php"> </form> </td> </tr> </table> </div> // INSERT TO DATABASE SECTION <?php $itemId = $_REQUEST['itemid']; // ITEM ID $memberId = $_REQUEST['userid']; // User ID $body = $_POST['message']; // GET MESSAGE $date = date("Y-m-d G:i:s", strtotime("now + 5 hours")); // DATE TIME $con = mysql_connect("localhost","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("testtask", $con); $sql="INSERT INTO surv_itemcomment (itemId, memberId, postDate, body) VALUES ('$itemId','$memberId','$date','$_POST[message]')"; { if (!mysql_query($sql,$con)) die('Error: ' . mysql_error()); } echo ""; mysql_close($con) ?>
  7. Hello, I have a formmail to send a message to a user called "form.php" within that form.php, I also have a SQL insert statement to insert into my database with the value $_POST[message] my objective is when a user go to form.php and fill out the form, it will send the form to me and also insert the message into a field in my database. everything seems to be working fine but my problem is when a user go to form.php, it automatically execute my INSERT INTO command right away. (user has not fill out the message yet) $sql="INSERT INTO surv_itemcomment (itemId, memberId, postDate, body) VALUES ('$itemId','$memberId','$date','$_POST[message]')"; how can I accomplish this? Thanks
  8. $date = date("Y-m-d G:i:s", strtotime("now + 5 hours")); thank you!!
  9. OK now I'm 5 hours behind.. how do I convert it? Thanks!
  10. I would like to echo out the timestamp in this format 0000-00-00 00:00:00 could someone please help? echo strtotime("now"), "\n"; gives me this format 1207319717 Thanks
  11. I have a form (using formmail), when a user submits the form, it will email that form to me but I would like it also to write to the database I have created with some of the variable submitted. I created the connection to the database, created the table, and columns.. but how do you integrate it? It seems so simple but I couldn't get it. help please!
  12. this is in the intranet so I'm not worry about that. if I want to use it in the first example, how wold I go about in doing it? Thank!@
  13. <form method="POST" action="http://emailer.someplace.com/submitform" name="mail_form"> <input type="hidden" name="mailto" value="someone@work.com"> <input type="hidden" name="order" value="out,users,message"> <input type="hidden" name="doublespace" value="no"> <input type="hidden" name="emailfrom" size="30" value="<?php echo $pagesender; ?>"> <input type="hidden" name="mailcc" value="<?php echo $emailfrom; ?>;<?php echo $pagesender; ?>"> <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --> <select size="1" name="out"> <option value="Int">Initial</option> <option value="2hr">2 Hours</option> <option value="4hr">4 Hours</option> <option value="6hr">6 Hours</option> <option value="8hr">8 Hours</option> <option value="12hr">12 Hours</option> <option value="16hr">16 Hours</option> <option value="20hr">20 Hours</option> <option value="24+hr">24+ Hours</option> </select> <input type="submit" value="Send" onclick="javascript:document.forms[0].mailcc.value=document.forms[0].emailfrom.value"> <input type="reset" value="Clear"> <input type="hidden" name="redirecturl" value="http://sendconfirm.php"> </form> What I would like to do is if the user select the value "Int" under the option in the form, the form will be mailed to someone@work.com and me@work.com could someone help me out on that? Thanks
  14. do you mind helping me get started? i don't intend to just go here and ask someone to write the script for me.. but Im just very clueless right now and will to learn. 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.