Jump to content

JasonHarper

Members
  • Posts

    32
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

JasonHarper's Achievements

Member

Member (2/5)

0

Reputation

  1. UPDATE: I downloaded SoapUI so I could see what's going on. It turns out the XML being generated is almost correct with one small issue....the header is inserting <item> and <key> tags within the XML: <securityCredentials> <item> <key>applicationId</key> <value>ABCDEF</key> </item> </securityCredentials> What I need is: <securityCredentials> <applicationId>ABCDEF</applicationId> <token>123456</token> </securityCredentials> If I could eliminate the tags, the XML would be correct. I've researched and can't seem to find a specific flag or setting so still stuck on what to do next.
  2. I'm trying to use the code below to make a SOAP request to a vendor's web service: $client = new SoapClient('http://my.domain.com/wsdl/GuestService.WSDL', array('connection_timeout' => 15, 'trace' => 1)); $ns = 'http://vendor.domain.com/'; $headerbody = array('brand' => 'BRAND1', 'locale' => 'en_us', 'securityCredentials'=>array('applicationId'=>'ABCDEF', 'token'=>'123456789123456789123456789')); $header = new SoapHeader($ns, 'Header', $headerbody); $client->__setSoapHeaders($header); $result = $client->getGuest(array('guestID' => '000787')); However, I'm getting an error back that no credentials were supplied so I must be doing something wrong. Error message: Uncaught SoapFault exception: [soapenv:NO_CREDENTIALS] I reached out to the vendor and they sent me an XML sample of how they're expecting to receive the data: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prox="http://vendor.domain.com" xmlns:gues="http://vendor.domain.com/guest"> <soapenv:Header> <prox:brand>BRAND1</prox:brand> <prox:locale>en_us</prox:locale> <prox:securityCredentials> <prox:applicationId>ABCDEF</prox:applicationId> <prox:token> 123456789123456789123456789</prox:token> </prox:securityCredentials> </soapenv:Header> <soapenv:Body> <gues:getGuest> <guestID>000787</guestID> </gues:getGuest> </soapenv:Body> </soapenv:Envelope> I thought I had accounted for everything in the above but maybe I'm missing something obvious. Really appreciate any help!
  3. Thanks KingPhilip! I implemented that code and now the form is indeed posting but the attributes of the button don't seem to be changing. Here is my current code: function fireSubmit() { document.emailNotifications.submitButton.disabled = true; document.emailNotifications.submitButton.value = 'Saving...'; document.emailNotifications.submit(); } </script> <form id="emailNotifications" name="emailNotifications" method="post" action="email-notifications.php"> <input type="submit" id="submitButton" name="submitButton" value="Save Changes" onclick="fireSubmit()"> </form>
  4. OK - thanks! The only jQuery I'm really using is for navigation based stuff. Everything else is all PHP.
  5. I'm trying to disable for more of a visual aesthetic...to let the user know something is happening. T he button changes color and says 'Saving' when in a disabled state. On my forms where the submit also processes a credit card transaction, I want to avoid multiple clicks.... Thanks again for the help!
  6. Thanks for the reply! Duh - that makes total sense - not sure what I was thinking. Is there an effective way to disable the button and still post the form? I'm OK with a page refresh.... Thank you!
  7. Hello, When a user clicks a Submit button on my page, I'm using an onClick event to essentially just disable the button and change the message to 'Saving'. However, when I add the onClick code, the form no longer posts using PHP. The button does indeed change but the postback never occurs. Is there something extra I need to add or do? Thank you!! This is my submit button: <input type="submit" id="submit" value="Save Changes" onclick="this.disabled=true; this.value='Saving'">|<a href="/">Cancel</a> Then I have the normal PHP stuff for postback which isn't firing.... //IF POSTBACK if ($_SERVER['REQUEST_METHOD'] == 'POST') { //DO STUFF HERE }
  8. Thank you! So right now I have: if($_POST['Submit']) Can you help me understand what the Submit_X is? Thank you! Jason
  9. Hello, I'm having a strange problem I can't seem to figure out. Traditionally in my php apps, I just use the standard html buttons. However, I've done one recently where I decided to use images as buttons. However, when a user submits a form using IE or Firefox, nothing happens. The form appears to post to the server because the fields are cleared but it's like no PHP code is executing. The page works fine in Chrome or Safari. Any idea how I can go about troubleshooting this? Thank you!!! Jason <input type="image" src="/images/button_submit.gif" name="Submit" value="Submit" alt="Submit" />
  10. That gave me what I needed! I had a typo in the database name. Thank you so much! Jason
  11. Hello, I have some code that has been running just fine on my in-house server. I moved it to an Amazon EC2 instance and now I get the following error: Warning: mysql_result() expects parameter 1 to be resource, boolean given in /var/www/INCLUDES/systemFunctions.php on line 174 Here is the code it's referencing: $result = mysql_query("SELECT count(*) FROM users WHERE userName='$email' AND password='$encryptPassword' AND accountStatus='1' AND accountVerified='1'"); $num = mysql_result($result, 0); I'm at a loss as to why this is happening. Thank you for any help!! Jason
  12. Hello! I'm sure I'm asking about a topic that has been answered but I can't seem to find the answer. I know mod_rewrite can be used to covert a querystring to a URL (i.e., /?string=TEST --> /string/TEST) but I'm trying to go the other way around. Here's my example: User goes to: http://www.mydomain.com/login/?id=12345 The ID is what identifies the customer so I know which database to reference. What I would prefer to do is replace that with a friendly name (that I will in turn use on the back end to lookup their customer ID). So, two questions.... How do I configure mod_rewrite so the customer can enter: http://www.mydomain.com/login/CompanyName and how do I capture the CompanyName value in PHP? Thank you so much!! Jason
  13. Hello, I've created a web application that customer subscribe to. Because they are storing sensitive data, I am using SSL to secure the site. Since I don't want to host a virtual directory/separate set of pages for each customer, I have a generic domain name/SSL that they then point a cname to: My URL: webapp.com Their CNAME: portal.mycompany.com When they hit my server, I redirect them to https://webapp.com However, many of the customers want to maintain their own URL in the browser bar and never want to see webapp.com. THe only way I know to do this is to create a separate virtual site with its own set of pages and an SSL certificate issued for the customer's domain. Is there any other way to do this so I can have their URL displayed in the browser bar? The entire application is written in PHP and I'm using Apache on CentOS. Thank you SO much for any help! Jason
  14. I just did a quick Google search for end of line issues with fgetcsv and one post said to add this: ini_set('auto_detect_line_endings', true); I added that to my code and it appears to be working perfectly! THank you schilly for putting me on the right track! Jason
×
×
  • 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.