
DrTrans
Members-
Posts
179 -
Joined
-
Last visited
Everything posted by DrTrans
-
Put this at top of file.. ini_set("sendmail_from", "[email protected]"); Heres how i do my send / response... your using an if(Mail()) statement.. call the function.. and check the variable for a responce. $sendmail = mail($to,$mailsubject,$message,$headers); $mailreturn = ($sendmail? "ACCEPTED BY SERVER" : "FAILED EMAIL") ;
-
Fatal error: Call to undefined function mssql_query()
DrTrans replied to maideen's topic in Microsoft SQL - MSSQL
You need to enable sql server support in the php.ini and install the sql server library. -
jQuery("#divResult").live("click",function(e){ var $clicked = $(e.target); [color=#ff0000]var data = $("#divResult");[/color] var $name = $clicked.find('.name').html(); var decoded = $("<div/>").html($name).text(); $('#inputSearch').val(decoded); alert(data); }); What im trying to do is. #divResult gives back the following " This is a test 148 "; what im looking to do is on the click go to " http://domain.com?num=$data" Right now, i cant even get it to display the " This is a test 148 . im sure there is a way to view the content of $("#divResult");
-
I do use salt to encrypt general passwords, but im using md5 for inner passwords. user accounts are using salt. override passwords are using md5. ( admin override). and the reason they cant use salt is because the passwords are generated in another application and they supply the md5 hash string.
-
Again, Yes, im new to JS!. im sure i have this wrong. somwhere. <script type=\"text/javascript\"><!-- var rate = \".04\"; function updatesum() { document.check.fee.value = (document.check.sum1.value -0 ) * rate; document.check.sum.value = (document.check.sum1.value -0) + (document.check.fee.value -0); document.check.rfee.value = Math.round(document.check.fee.value*100)\100; document.check.rsum.value = Math.round(document.check.sum.value*100)\100; } </script>
-
As i was trying to do this i figured out that javascript does not have a md5 generator built it to see if it actually matched.
-
Hi , Very new JS!. and need some help with Rounding. I got this code and it works but does round the numbers. Is there a way to round to the second decimal point the variables: document.check.fee.value document.check.sum.value <script type=\"text/javascript\"><!-- var rate = \".04\"; function updatesum() { document.check.fee.value = (document.check.sum1.value -0 ) * rate; document.check.sum.value = (document.check.sum1.value -0) + (document.check.fee.value -0); } </script>
-
Will not load the page with the javascript part. Im completely noob at using JS!.
-
Im using javascript and php to verify what is typed in the "changepassword" text box = the current password in $password variable from php. print "<script type=\"text/javascript\">"; print " var currentpass = \"$password\"; var oldpass = document.changepassword.oldpassword.value; function chkpass(currentpass,oldpass) { if(currentpass == oldpass) document.changepassword.response.value = \"Match\"; } "; print "</script>" print "<form name=\"changepassword\" method=\"POST\" action=\"dashboardt.php?control=changepass\">"; print "<table width=\"50%\" class=\"table2\">"; print "<tr>"; print "<td align=\"center\">Current Password:</td>"; print "<td class=\"td2\">$icon<input type=\"password\" name=\"oldpassword\" onchange=\"chkpass()\"><input type=\"text\" name=\"response\"></td>"; print "</tr>"; print "<tr>"; print "<td>New Password:</td>"; print "<td class=\"td2\">$icon<input type=\"password\" name=\"newpassword\"></td>"; print "</tr>"; print "<tr>"; print "<td colspan=\"2\"><input type=\"submit\" class=\"submit1\" value=\"Change Password\"></td>"; print "</tr>"; print "</table>"; print "</form>";
-
Could it be a server side setting?
-
Why do the html tags show threw when it sends the mail. I have the charset set. $person = $_POST['email']; $submit = $_POST['submit']; if($submit) { //// EMAIL SCRIPT ini_set("sendmail_from", "$dbusername <$dbusername>"); $message = " <html> <p><strong>$dbusername</strong> has sent you a request for Site!</p> <p> Please follow the hyperlink below to fill out your new rental home application. </p> <br /> <a href=\"https://site/application.php?ownerid=$loginid&process=1\">Click Here for Application!</a> <br> </html> "; $mailsubject = "Application Request from Site!"; $headers = "From: Site! <$dbusername>\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $sendmail = mail($person,$mailsubject,$message,$headers); //echo "<BR/>mail() returned: " . ($sendmail? "TRUE" : "FALSE") . "<BR/>"; // echo "$property -- $service --- $extra -- $pay --$mainemail"; printf("<script>location.href='dashboard.php?control=managea'</script>"); }
-
No. Theres other data that i dont want public on the internet from the xml string. Let me format and ill repost the $data code
-
Theres more xml.. its actually valid. I just need to get the transaction number. and put it into a string
-
I super duper need some help. I need to be able to store the Transaction Number in my MySql Database. Can Someone please help $data = " <Response> <TransactionNumber>2411314</TransactionNumber> <ReportDate>2012-08-13</ReportDate> <ApplicationDecision>Conditional</ApplicationDecision> <Report><![CDATA[ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Applicant Screening Results</title> </head></html></Report> "; $xml = new simplexml_load_string($data); $xml->asXML(); $xml->Responce->asXML(); $xmlnum = $xml->TransactionNumber->asXML(); echo "<br>$xmlnum<br>"; $data2 = $xml->Response->asXML(); $connect = mysql_connect("localhost","****","*****"); mysql_select_db("magic"); $back = "2"; $queryreg = $mysql_query("UPDATE application SET background_num = '$xmlnum' WHERE appID = '$appID'")or die(mysql_error());
-
Its only the Select box....however, my <select> in other forms work fine
-
Ill post the entire script: print"<form action=\"process.php?process=charge\" name=\"charge\" onSubmit=\"return validateForm();\" method=\"POST\">"; print"<tr>"; print"<td align=\"right\"><b>Property:</b></td>"; get_connect(); $query = "SELECT * FROM props WHERE propid = $propertyid and loginid = $loginid"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { $propertyid = $row['propid']; $propertyname = $row['name']; $propertydesc = $row['description']; $propertyaddy = $row['address']; $propertycity = $row['city']; $propertystate = $row['state']; $propertyzip = $row['zip']; $tenantid = $row['tenantid']; $active = $row['active']; $lease = $row['lease']; $leaseamt = $row['leaseamt']; $owner_id = $row['ownerid']; } print"<td align=\"left\"><input type=\"hidden\" name=\"pay_property\" value=\"$propertyid\">$propertyaddy<br> $propertycity, $propertystate, $propertyzip</td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\">Tenant:</td>"; print"<td align=\"left\"> <input type=\"hidden\" name=\"pay_tenant\" value=\"$tenantid\">$tenantid</td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\"><input type=\"hidden\" name=\"pay_owner\" value=\"$owner_id\"></td>"; print"<td align=\"left\"></td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\">Date/Time:</td>"; $current_date = date("Y-m-d"); print"<td align=\"left\"><input type=\"text\" class=\"input3\" name=\"pay_date\" value=\"$current_date\"></td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\">Charge Amount:</td>"; print"<td align=\"left\"><input type=\"text\" class=\"input3\" name=\"pay_amount\" value=\"$leaseamt\"></td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\">Charge Amount:</td>"; print"<td align=\"left\"><input type=\"text\" name=\"account1\"value=\"1\"></td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\">Account:</td>"; print"<td><select name=\"account\">"; get_connect(); $query = "SELECT * FROM chartofaccounts ORDER BY AccountNumber ASC"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $accountnumber = $row['AccountNumber']; $name = $row['Name']; print "<option value=\"$accountnumber\">$accountnumber $name </option>"; } print "</select>"; print "</td></tr>"; print"<tr>"; print"<td align=\"right\>Notes/td>"; print"<td align=\"left\"></td>"; print"</tr>"; print"<tr>"; print"<td align=\"left\" colspan=\"2\"><textarea name=\"pay_message\" cols=\"55\" rows=\"10\"> </textarea></td>"; print"</tr>"; print"<tr>"; print"<td align=\"right\</td>"; print"<td align=\"center\"></td>"; print"<tr>"; print"<td align=\"left\" colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Charge Account\"></td>"; print"</tr>"; print"</tr>"; print "</form>"; print"</table>"; } process.php?process=charge if($process == "charge"){ print_r($_POST); } The print_r($_POST) : Array ( [pay_property] => 256 [pay_tenant] => 23 [pay_owner] => 5 [pay_date] => 2012-08-01 [pay_amount] => 600 [account1] => 1 [pay_message] => [submit] => Charge Account ) 1
-
if i change it to <input type=\"text\" name=\"account\" value =\"1\"> Comes back Array ( [account] => 1) ITS ONLY on the Select
-
print "<option value=\"$accountnumber\"> $accountnumber $name </option>"; Nothing came back on the print_r($_POST);
-
I put in the double quotes.. nothing.
-
I cant seem to figure out why this select wont post data to the form handler print"<td align=\"right\">Account:</td>"; print"<td> <select name=\"account\">"; get_connect(); $query = "SELECT * FROM chartofaccounts ORDER BY AccountNumber ASC"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $accountnumber = $row['AccountNumber']; $name = $row['Name']; print "<option value=$accountnumber> $accountnumber $name </option>"; } print "</select>"; print "</td></tr>"; my form handler is: <?php $account = $_POST['account']; die($account); ?>
-
Saw an error in database, one of the dates was set as 2012-00-18. Fixed the Dtae and Got the echo response as "May " anyway to it to do January - Amount Feb - Amount March - Amount .. Right now it only gives me an echo of " May "
-
Copied and Pasted into new file.. Same issue.
-
response to the var_dump(); array(2) { ["MONTHNAME(pay_date)"]=> string(3) "May" ["SUM(pay_amount)"]=> string(5) "-1127" }
-
That is all the code in the function. on the echo mysql_num_rows($r); It game me "4"
-
My db looks exactly the same, However, no results from the "echo".... My Database: pay_amount | pay_date | pay_controller ---------------------------------------------------------- 107.13 2012-07-07 + 98.10 2012-07-07 - i even copied ur code and edited the fields in mysql statement to function operatingyear($daterange) { print "<center><h3> OPERATING STATMENT REPORT [12-Month]</h3></center>"; print "<hr>"; print "<br />"; getconnect(); $q = 'SELECT MONTHNAME(pay_date), SUM(pay_amount) FROM payment GROUP BY YEAR(pay_date), MONTH(pay_date)'; $r = mysql_query($q) or die(mysql_error()); $sum = mysql_result($r,0); echo $sum; }