Jump to content

lovemy7

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lovemy7's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, The ISP's I use that have an SMS service treat it as a form and you pass the various components Here is the bones of one I have just implemented. //-----------------Build the body ------------------------------------------------------------ $smsBody = 'Invoice# '.$ThisNewInvoice."\n"; $smsBody .= $row_userDetail['title'].' '.$row_userDetail['firstName'].' '.$row_userDetail['surname'].' '."\n"; $smsBody .= 'Grand Total: '. number_format($grandtotal, 2, ".", ",").' '."\n"; //---------------------------------------SMS--------------------------------------------------------- include("includes/cHTTP.php");//---------------Class allows posting to a page without a form //--------------------------------------Set up SMS ----------------------------------------------------- $http = new cHTTP(); // clear all fields $http->clearFields(); $http->addField ( 'Login' , 'coc01' ); $http->addField ( 'password' , '**********' ); $http->addField ( 'page' , 'http://www.yourdomain.com/' ); $http->addField ( 'recipients' , '12345678910' ); $http->addField ( 'sms' , $smsBody ); $http->addField ( 'sender' , '27796085139' ); //-------------------------------------------Send SMS --------------------------------------------------- $http->postPage("http://yourserviceprovider.com/sms/sendsms.asp");//------------the ISP sms Page
  2. lovemy7

    mail

    Hi, I don't know Argosoft but normally From: and Return path require email addresses not IP addresses. IT seems the Argosoft is trying to relay. Change to emails addresses and try it Hope this helps Cheers
  3. To hvle, Message received thanks for the offer, cant reply problem solved see above post. Once again thanks to all!
  4. Dear All, hvle wrote"PHP features type juggling and it would cast to an appropriate type for you automaticly." And herein lies the issue and the problem: An integer followed by a minus followed by an integer?? {date("U")} may be construed as an integer or at best float. By changing the separator to an underscore "_" which is not an operator the SESSION works just fine, changing back to a minus "-" returns all the issues. Now hvle I never said I was an expert at PHP I said I was not a beginner at PHP or programming. I am certain you are an expert. If so please understand that the website we are building is a XHTML /CSS framework with content, some structure, language, attributes, presentation and some behaviors served dynamically by PHP. The client side behaviour is javascript but many of the external scripts are served dynamically in the XHTML structure by PHP. Now this may offend your sensibilities in wanting to gun code every morsel in PHP and echo every XHTML tag, content, behavior etc. But it is just not possible. I am now going to blast my 7 down the road to vent my frustration:)
  5. To hvle: The reason the (4) is behind the var is that I have a security man who will not allow me to post the actual var name as it is passed to the bank. I edited the var suffixes to comply with my paranoid client and so I could quickly change them back! Now the reason there is PHP within the XHTML is because this is a multilingual web page/site capable of serving any of up to 255 languages to the same page. All prompts and content are in a database and are dynamically placed in position based on the language selected. Remember we live in a multi-lingual society where English is not the only language (in fact a minor language). A vast amount of both the XHTML and the content have to be changed depending on the language chosen. Finally the shopping basket is an AJAX system placing the information in the database and then being extracted at invoice level. In our original development stage we compared the speed and accuracy of generating all XHTML from PHP and interspersing a XHTML framework with dynamic script. The second option is faster as PHP parses that which is PHP and then the HTML is done, the other way it places an additional burden on the PHP parser to process all the HTML then the  HTML still has to be parsed. To HuggieBear I would love to post all of the script but 1: My client wont allow it and 2: the two pages concerned with includes amount to over 900 lines of script. Again to hvle: Do not judge the whole book by a few words! You do not know everything and all you have succeeded in doing is pissing me off. Please post a photo of you walking on water.
  6. Hi hvle, I verified that I had not reset the var first! below is every instance of the particular Session var cut and pasted. [code]<?php $BR_colname_GetTempInvoice = "-1"; if (isset($_SESSION['invoiceData(4)'])) {   $BR_colname_GetTempInvoice = (get_magic_quotes_gpc()) ? $_SESSION['invoiceData(4)'] : addslashes($_SESSION['invoiceData(4)']); } ?> <p><?php echo $row_FormPrompts['youwillnowbetrans']; ?></p><?php echo $_SESSION['invoiceData(4)']; ?> <input name="MB" type="hidden" value="<?php echo $_SESSION['invoiceData(4)']; ?>" />[/code] As you can see that they are all referenced but not set unless addslashes applies. But once again it is supposed to be a string and not the individual components of the made up string. I only ever set the string in one place in the whole site as below in a two step process. The first step was added to try and stop this nightmare. [code]<?php $BR_unique_Ref = (string)$row_FindUser['userID']."-".date("U"); $_SESSION['invoiceData(4)'] = (string)$BR_unique_Ref; ?>[/code] So I will again ask my original question...does PHP back reference a variable to it's original components thus allowing the clock to run even though its has been concatenated and cast to a string? I am beginning to believe it does, this could have very serious ramifications. BTW I am not a beginner at PHP or programming and posted here because I believe this forum to be the quintessential repository of PHP knowledge and have tried every other venue for this problem. 
  7. Hi Jim R, Sorry I made an assumption on your skill level... here is a fully working page you can build on. [code]<?php //Find out the group and set to $group $group =3;//This could be from a DB or Session variable //Now Set up the Show Hide string for the <body> tag if($group == 1) {$Showhide = "MM_showHideLayers('group1','','show','group2','','hide','group3','','hide','group4','','hide')";} elseif($group == 2) {$Showhide = "MM_showHideLayers('group1','','hide','group2','','show','group3','','hide','group4','','hide')";} elseif($group == 3) {$Showhide = "MM_showHideLayers('group1','','hide','group2','','hide','group3','','show','group4','','hide')";} elseif($group == 4) {$Showhide = "MM_showHideLayers('group1','','hide','group2','','hide','group3','','hide','group4','','show')";} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <!-- Deamweaver show/hide Javascript //--> <script type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);   if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v6.0   var i,p,v,obj,args=MM_showHideLayers.arguments;   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }     obj.visibility=v; } } //--> </script> </head> <!--now we echo the $Showhide string withing the double quotes of the onload param --> <body onload="<?php echo $Showhide?>"> <div id="group1">Group 1 DIV</div> <div id="group2">Group 2 DIV</div> <div id="group3">Group 3 DIV</div> <div id="group4">Group 4 DIV</div> </body> </html> [/code] This is the way I would do the deed. Lovemy7 (The 7 refers to my Lotus 7)
  8. Hi, I set the Session var once only. Then all I desire is for the value in that session var to stay the same so that I can compare it to values stored in my DB to identify the transaction. If I echo the Session on the same page 20 times it stays the same the moment I call a new page the value changes ... sometimes, not always. Now my issue is what more must I do to force the Session var to stay the same and not change! When I create the string I cast (string)... when I assign the string to the Session var I cast (string) thereafter I only read the value, never reset it. Thanks
  9. Hi, Try something like this [code]<body onload="MM_showHideLayers('rollover','','show','kids','','hide','sport','','hide','bloodsugar','','hide','weightloss','','hide','diabetics','','hide'<?php if (isset($_SESSION['countout'])){if($_SESSION['countout']<=1){echo ",'loginuser','','hide','welcomeuser','','hide'";}}?>)">[/code]
  10. I am developing an online purchasing site. To identify a specific transaction I set up a uniqueRef based on the userID(int) a "-" and date("U") concatenated together the minus sign is a separator  so I can strip the ID later when returned from the bank. [code]$BR_unique_Ref = (string)$row_FindUser['userID']."-".date("U"); $_SESSION['invoiceData(4)'] = (string)$BR_unique_Ref;[/code] I have cast to force to string! My problem is between pages on the site the $_SESSION increments by a few seconds blowing apart my unique ref completely. What am I doing wrong, does PHP back reference a variable to it's original components thus allowing the clock to run even though its has been concatenated and cast to a string?
×
×
  • 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.