Jump to content

alohatofu

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

Everything posted by alohatofu

  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
  15. I'm a very noob when it comes to php and mysql and i'm still learning. I have a relatively simple task to do. My server is a windows server with apache and php I would like to have a link when a user click on it, it will automatically send a predefined message using formmail script that I have. (only formail) it then write a (1) to the database so that it doens't display that link any longer once a message has been submitted.
  16. Does anyone know if there is any script that will let you manage work shift schedule?
  17. I could use an IF statement but that would not be appropriate?
  18. I would like a user to input a keyword and based on the keyword the user enter, I would like to take the user to a form for a user to fill out. let's say a user enter "breakfast" or "break fast" I would like to take the user to a form regarding breakfast. if a user enter the keyword which does not have a form defined for that keyword, display something so a user knows that it's not one of the keyword
  19. Hello, I'm wondering if anyone can help me do this. I would like to have a field which a user will enter a keyword in the field and submit, upon submit, the script bring up a form based on the user's keyword. Is it possible to do that if so anyone can give me an example? Thanks
  20. can someone please give me some pointers? Thanks
  21. I'm wondering if anyone can help me with this issue I'm having. I would like to create a conditional cascade form. based on the selection, it can display or not display an input form for the user to enter an string of text. then at the bottom of the page (or when a user submit) connect all the sections including the input field all together (it's like a story maker?) Can someone please help me out by giving me an example so I can work towards my goal? Thanks!!
  22. hello I have this number 0030007 I would like to take away the first 2 zeros ONLY and display me the last 5 digits ONLY. I've tried using /[1-9]{5}/ but it doesn't work Can somone please help? Thanks
  23. Anyoen know where I can get the date picker that will give me this format? 2007-04-30 19:59:00 ? thanks
  24. Ok, I have the following code. The problem with it is that everytime the "clli" is being dispalyed somewhere, it count as an instance. I just want the total value of instances (actual count) <div id="vvisi"><?php $right_now = time(); $start_date = $right_now - (86400*30); $clli = $objTask->clli; $query = "SELECT count(clli) FROM surv_item, surv_itemstatus " ." WHERE surv_item.itemId = surv_itemstatus.itemId AND statusDate >= FROM_UNIXTIME($start_date)" ." AND clli = '$clli'" .""; $result = mysql_query($query); $row = mysql_fetch_array($result); if ( $row[0] >= 3 ) { ?> <font color="red"><b><?php echo $GLOBALS['langForm']['chronicdetected'];?></font></b> -<?php print $row[0]; ?></a> <?php }elseif ( $row[0] < 3 ) { ?> <font color="green"><b><?php echo $GLOBALS['langForm']['nochronic'];?></font></b></a> <?php } else { } ?></div> </div>
×
×
  • 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.