-
Posts
69 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Male
-
Location
UK
DirtySnipe's Achievements

Member (2/5)
0
Reputation
-
I have a php file which contains a html form. Within the html form are multiple drop down boxes which are supposed to pull information from a mysql database. What im also trying to do is get it to show a default entry from the database. <select style="width:100px" name="person_involved"> <?php mysql_connect("localhost", "username", "password") or die("Connection Failed"); mysql_select_db("mydatabase") or die("Connection Failed"); $sql = "SELECT * FROM hesk_location ORDER BY name ASC"; $result = hesk_dbQuery($sql); while ($row=hesk_dbFetchAssoc($result)) { $sel = $row['isDefault'] == true ? "selected='selected'" : ""; ?> <option <?=$sel?> value="<?=$row['name']?>"><?=$row['name']?></option> <?php } ?> </select> but for some reason it only displays Value=""> not the values from the database.. can anyone help me out here?
-
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Just great. -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Is that not a hint ive been trying to convert the old file??? -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Still need help on this one. -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
155 views and 0 help..... Nice -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Still need help with this. -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
...BUMP... Still need help with this. -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Can anyone help with this please? -
Need help upgrading MRBS mail function
DirtySnipe replied to DirtySnipe's topic in Third Party Scripts
Im stuck on the following part. the old modified part it goes as follows:- Line 789 there is an sql select you can see the modification by the ref JM in the comment. I cannot see how to add these modifications in the new file. -
I have a customized old version of MRBS 1.x.x which added equipment to the booking system. When you click on an item and submit the booking it would email the it department with the booking information and the required equipment they selected. They have upgraded the script to now include this and fix alot of bugs. But they didn't include the email notification part. Can anyone help to convert my modified mail function to the newer version? I have attached the files into a zip. Thanks in advance [attachment deleted by admin]
-
Why don't you just take a look at this php / mysql search engine script. Look into the code to figure out how they did it and make your own from there. http://www.sphider.eu/
-
How can i add this email validation to this php code
DirtySnipe replied to DirtySnipe's topic in PHP Coding Help
I think i fixed it myself function privacy_form($idnum) { global $ct, $tbclr_1, $tbclr_2, $tbclr_3, $tbclr_4, $fntclr_1, $emltp, $emllogin, $msg2, $indx_url ; $fields_val=get_edit_info($idnum); $message= " <script type='text/javascript'> /*********************************************** * Email Validation script- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i function checkmail(e){ var returnval=emailfilter.test(e.value) if (returnval==false){ alert('Please enter a valid email address.') e.select() } return returnval } </script> <center> <table width='600' border=0 cellspacing=1 cellpadding=0> <tr><td> <a href='{$indx_url}ct=$ct&md=details&id=$idnum'> ".$msg2['ID_f']."".$fields_val['idnum']."<b> ".$fields_val['title']."</b> </a></font> </td></tr></table> <p class='pst1'> <table width='600' class='frmtb1' border=0 cellspacing=1 cellpadding=0> <tr><td> <font class='frmcp'> ".$msg2['Send_Privacy_Message']." </font> <table width='100%' border=0 cellspacing=1 cellpadding=0> <tr><td class='frmtb2'> <form action='{$indx_url}ct=$ct&md=send_mail' method='post'> <input type='hidden' name='idnum' value='$idnum'> <input type='hidden' name='emltp' value='$emltp'> <input type='hidden' name='emllogin' value='$emllogin'> <p class='pst1'><center> <table> <tr> <td align='right' > <font class='frmft1'> ".$msg2['Your_e_mail_f'].": </font> </td><td> <input type='text' name='pm_email' size='40' class=formst></td></tr><tr> <td align='right'> <font class='frmft1'> ".$msg2['Subject_p'].": </font> </td><td> <input type='text' name='pm_subject' size='40' class=formst value='Re: ".$fields_val['title']."'></td></tr><tr> <td align='right'> <font class='frmft1'> ".$msg2['Message_p'].": </font> </td><td> <textarea rows='8' cols='40' name='pm_message' class=formst></textarea> </td></tr> </table> <p class='pst1'> "; $message=$message." <input type='submit' value='".$msg2['Send_p']."' onClick='return checkmail(this.form.pm_email)' class=formst STYLE='FONT-WEIGHT: bold;'> </form> </center> </td></tr></TABLE> </td></tr></TABLE> </center> "; output_message($message); return; } -
Im trying to insert email validation to the following code but no matter what I try it does not work. Please help. email validation code <script type="text/javascript"> /*********************************************** * Email Validation script- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i function checkmail(e){ var returnval=emailfilter.test(e.value) if (returnval==false){ alert("Please enter a valid email address.") e.select() } return returnval } </script> <form> <input name="myemail" type="text" style="width: 270px"> <input type="submit" onClick="return checkmail(this.form.myemail)" value="Submit" /> </form> php form code function privacy_form($idnum) { global $ct, $tbclr_1, $tbclr_2, $tbclr_3, $tbclr_4, $fntclr_1, $emltp, $emllogin, $msg2, $indx_url ; $fields_val=get_edit_info($idnum); $message= " <center> <table width='600' border=0 cellspacing=1 cellpadding=0> <tr><td> <a href='{$indx_url}ct=$ct&md=details&id=$idnum'> ".$msg2['ID_f']."".$fields_val['idnum']."<b> ".$fields_val['title']."</b> </a></font> </td></tr></table> <p class='pst1'> <table width='600' class='frmtb1' border=0 cellspacing=1 cellpadding=0> <tr><td> <font class='frmcp'> ".$msg2['Send_Privacy_Message']." </font> <table width='100%' border=0 cellspacing=1 cellpadding=0> <tr><td class='frmtb2'> <form action='{$indx_url}ct=$ct&md=send_mail' method='post'> <input type='hidden' name='idnum' value='$idnum'> <input type='hidden' name='emltp' value='$emltp'> <input type='hidden' name='emllogin' value='$emllogin'> <p class='pst1'><center> <table> <tr> <td align='right' > <font class='frmft1'> ".$msg2['Your_e_mail_f'].": </font> </td><td> <input type='text' name='pm_email' size='40' class=formst></td></tr><tr> <td align='right'> <font class='frmft1'> ".$msg2['Subject_p'].": </font> </td><td> <input type='text' name='pm_subject' size='40' class=formst value='Re: ".$fields_val['title']."'></td></tr><tr> <td align='right'> <font class='frmft1'> ".$msg2['Message_p'].": </font> </td><td> <textarea rows='8' cols='40' name='pm_message' class=formst></textarea> </td></tr> </table> <p class='pst1'> "; $message=$message." <input type='submit' value='".$msg2['Send_p']."' class=formst STYLE='FONT-WEIGHT: bold;'> </form> </center> </td></tr></TABLE> </td></tr></TABLE> </center> "; output_message($message); return; }
-
Is it possible to display Mon, Tue, Wed and so on instead of day1, day2, day3?