Jump to content

deft

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

deft's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yeah true that, but I gotta get this thing working (meaning presentable to customers seeing it). I'll turn it back up and work out the errors as I go. good advice, mr. thorpe, thnx
  2. Right, ok, now I see those message titled 'Notice' aren't to do with anything stopping the code from working. They must be less serious than 'warnings'. (?) Is there a setting in php.ini to turn them off?
  3. I moved to a new laptop and after installing apache/php/mysql on it successfully, I copy my php files and database over, but my XP SP2 install of Apache 2.2.6, PHP 5.2.4 and MySQL 5.0.4 is having trouble with POST data. I get 'Undefined index' or 'Undefined constant' errors everywhere a value is sent with POST through a form.
  4. I've got this javascript that results in the following being posted; weight_1 = 30 cost_1 = 20 amount_1 = 32 weight_3 = 65 cost_3 = 23 amount_3 = 12 weight_7 = 43 cost_7 = 9 amount_7 = 12 etc.., with the numbers appended to the keys (here 1, 3, and 7) ascending but not sequential. I need my PHP recieving these POST keys/values to present them like this: #1 Weight: 30 Cost: 20 Amount: 30 #2 Weight: 65 Cost: 23 Amount: 12 #1 Weight: 43 Cost: 9 Amount: 12 Whats' the right way to do this? I've been messing around with array functions but haven't quite figured out which to use..
  5. I'm trying to use fsockopen(), fwrite(), etc. to post an XML document to a server in a special way. It's the server which delivers wap-push messages to our cell phones. I took the example code for using fsockopen() right from php.net and tried to adapt it but I can't get it to post properly. I do at least get connected to the server and get error messages from it. Mostly I've gotten 400; bad request. I think its' because the headers and XML document are not making it across as they should. Here's what I'm using; <?php $fp = fsockopen("atlsnup2.adc.nexteldata.net", 4445, $errno, $errstr, 999); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "POST /ntfn/add HTTP/1.0\r\n"; $out .= "Accept: text\r\n"; $out .= "Content-type: application/vnd.uplanet.alert\r\n"; $out .= "Content-Length: 191\r\n"; $out .= "x-up-upnotifyp-version: upnotifyp/3.0\r\n"; $out .= "x-up-subno: 1132666310-43947622_atlsnup2.adc.nexteldata.net\r\n"; $out .= "x-up-ntfn-ttl: 0\r\n"; $out .= "x-up-ntfn-channel: push\r\n"; $out .= "Content-Location: http://wap.example.com/apage4u.wml\r\n"; $out .= "\r\n"; $out .= "<?xml version=\"1.0\"?>\r\n"; $out .= "<!DOCTYPE ALERT \nPUBLIC \"-//PHONE.COM//DTD ALERT 1.0//EN\" \"http://www.phone.com/dtd/alert1.xml\">"; $out .= "</xml>\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> I got the instructions for what to post from the phone company's site. Any help getting this to work would be greatly appreciated.
  6. anybody care to help me simplify this? if ($fromzip == 98101 && $tozip == 98004 || $fromzip == 98004 && $tozip == 98101) $baserate = 18.37; elseif ($fromzip == 98101 && $tozip == 98005 || $fromzip == 98005 && $tozip == 98101) $baserate = 19.37; I'm trying to say "if either the from-zip is X and the to-zip is Y or vice-versa" in such a way that I don't have to write them both twice.
×
×
  • 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.