Jump to content

jakebur01

Members
  • Posts

    885
  • Joined

  • Last visited

Everything posted by jakebur01

  1. SELECT DISTINCT CLASS FROM ARINVT01 WHERE `CLASS` <> `AD ALLOWANCE` AND `CLASS` <> 'STOP CHARGE' AND `CLASS` <> 'MISCELLANEOUS' ORDER BY CLASS ASC
  2. I tried it with AND and OR and I get this error for both: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource SELECT DISTINCT CLASS FROM ARINVT01 WHERE `CLASS` <> `AD ALLOWANCE` AND `CLASS` <> 'STOP CHARGE' AND `CLASS` <> 'MISCELLANEOUS' ORDER BY CLASS ASC
  3. What is the correct way to do this? SELECT DISTINCT CLASS FROM ARINVT01 WHERE (`CLASS` <> `AD ALLOWANCE`, `CLASS` <> 'STOP CHARGE', `CLASS` <> 'MISCELLANEOUS') ORDER BY CLASS ASC
  4. I tried linking the tables using MS ACCESS. Then, I tried using the mysql migration toolkit. But, the linked tables would not show up. Does anyone know of any program similar to navicat that would allow me to connect to the ODBC data source directly and schedule it to migrate or mirror the data over to my mysql source? Thanks, Jake
  5. I am looking for an open source windows program that will mirror a local ODBC connection to a remote MySQL database hourly. Any ideas?
  6. It does not give me 404 Page Not Found in IE, this is happening in Safari. Jake
  7. jakebur01

    fdf

    I set up a pdf document with form fields and a submit button that will submit html to a php document which generates a .fdf document. All this is working, but when I call the .fdf document up in the browser, it then redirects me the .pdf. I get "404 page not found", but when I hit "refresh" the .pdf loads fine with the .fdf data pluged in. Any ideas? create pdf function function createFDF($file,$info){ $data="%FDF-1.2\n%âãÏÓ\n1 0 obj\n<< \n/FDF << /Fields [ "; foreach($info as $field => $val){ if(is_array($val)){ $data.='<</T('.$field.')/V['; foreach($val as $opt) $data.='('.trim($opt).')'; $data.=']>>'; }else{ $data.='<</T('.$field.')/V('.trim($val).')>>'; } } $data.="] \n/F (".$file.") /ID [ <".md5(time()).">\n] >>". " \n>> \nendobj\ntrailer\n". "<<\n/Root 1 0 R \n\n>>\n%%EOF\n"; return $data; } Here is one of the generated .fdf documents: %FDF-1.2 %âãÏÓ 1 0 obj << /FDF << /Fields [ <</T(business_name)/V(Test Company)>><</T(p1)/V(Yes)>><</T(p2)/V()>><</T(business_address)/V(123 Test Drive)>><</T(city)/V(Test City)>><</T(state)/V(TE)>><</T(zip)/V(12345)>><</T(business_mailing)/V(Test Business Address)>><</T(nearest_stores)/V(Test Nearest Store)>><</T(business_phone)/V(555-123-1234)>><</T(fax_number)/V(555-123-1233)>><</T(federal_id)/V(12-1234442)>><</T(owner)/V(Test Owner)>><</T(contact_name)/V(Test Contact Name)>><</T(home_address_1)/V(Test Home Address)>><</T(home_address_2)/V(Test Home Address 2)>><</T(ss)/V(111-22-22222)>><</T(home_phone)/V(222-111-2234)>><</T(drivers_lic)/V(2324235235425)>><</T(c1)/V(Yes)>><</T(c2)/V()>><</T(c3)/V()>><</T(c4)/V()>><</T(bank_name)/V(Test Bank Name)>><</T(bank_address)/V(Test Bank Address)>><</T(bank_city)/V(Test City)>><</T(bank_state)/V(TE)>><</T(bank_zip)/V(13498)>><</T(bank_phone)/V(444-444-2323)>><</T(checking_account)/V(3203o4iu2)>><</T(bank_officer)/V(Test Officer)>><</T(sig)/V(Test Sig)>>] /F (http://www.mysite.com/credit_application.pdf) /ID [ <5d8a41ab0ddaf80840cd79d7f1a57db9> ] >> >> endobj trailer << /Root 1 0 R >> %%EOF
  8. I moved all the code to the top of the page and the header error went away. I tried echo $cookies['PHPSESSID']; in the body and it did not return anything. Did it return anything for you when you tested it on your end?
  9. I get this header error, Warning: Cannot modify header information - headers already sent on this line -> setcookie($cookies['PHPSESSID']); echo $cookies['PHPSESSID'];
  10. Thanks! It works, although I get header errors. How can I store the SESSIONID in the variable $session ? Example: <script type="text/javascript"> <!-- window.location = "http://my3rdpartysite.com/customer?SESSIONID=<?PHP echo"$session";?>" //--> </script>
  11. bump...
  12. EDIT: the form in the first post /// action should equal "http://my3rdpartysite.com/login" ONLY... The javascript should not be in there. That was from when I was playing with injecting javascript.
  13. A 3rd party hosts our online ordering site that is integrated with our inventory software program. I have a customer login page on our "Corporate Site" and I am wanting to login to our "online ordering site" directly from this page. First I tried: <p class="main_body"><form action="http://mysite.com/login javascript:window.location=http://my3rdparysite.com/login" method="post" id="contactform"><table><tr><td><input name="username" type="hidden" value="demo" /></td></tr><tr><td><input name="password" type="hidden" value="demo" /></td></tr><tr><td> </td><td><input name="Submit" type="submit" value="Sign in to Demo account" /></td></tr></table></form></p> This takes me to http://my3rdpartysite.com/login. The text on the page displays {"success":true,"route":"\/myname\/customer\/"} . So when I change the url in the browser from http://my3rdpartysite.com/login to http://my3rdpartysite.com/customer, I am logged in. So, then I researched to see if there is a way to inject javascript in the form or url so when it reaches 3rdpartysite.com/login, it would automatically redirect to 3rdpartysite.com/customer, then I would be logged in. _____________ Here is the other idea. Log into 3rdpartysite.com/login from customer login page on corporate site using curl, grab the sessionid, then redirect to the 3rdpartysite.com/customer?SESSIONID=$session....... except.. I do not know how to store the SESSIONID into $session. <?PHP $headers = array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0. Gecko/20061025 Firefox/1.5.0.8"); $url="http://my3rdpartysite.com/login"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt'); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, "username=demo&password=demo"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_MAXREDIRS, 4); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $store = curl_exec ($ch); curl_close ($ch); print_r($store); ?> <script type="text/javascript"> <!-- window.location = "http://my3rdpartysite.com/customer?SESSIONID=<?PHP echo"$SESSION";?>" //--> </script> Any ideas?
  14. It is updating the first row of callbacks table columns A1-A6 and that is all it is updating. For some reason it is not storing B1-E7 in the array and it is not looping through the other rows. foreach ($zips as $key => $value) { $result = mysql_query("SELECT Dealer, Address, City, State, Zip, Phone FROM extreme WHERE Zip = '$key' AND Type='store' AND `InStore` <> 'NO' LIMIT 5", $db); while($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { $myrow[] = $row; } mysql_query("UPDATE callbacks SET `A1`='{$myrow[0]['Dealer']}', `A2`='{$myrow[0]['Address']}', `A3`='{$myrow[0]['City']}', `A4`='{$myrow[0]['State']}', `A5`='{$myrow[0]['Zip']}', `A6`='{$myrow[0]['Phone']}', `B1`='{$myrow[1]['Dealer']}', `B2`='{$myrow[1]['Address']}', `B3`='{$myrow[1]['City']}', `B4`='{$myrow[1]['State']}', `B5`='{$myrow[1]['Zip']}', `B6`='{$myrow[1]['Phone']}', `C1`='{$myrow[2]['Dealer']}', `C2`='{$myrow[2]['Address']}', `C3`='{$myrow[2]['City']}', `C4`='{$myrow[2]['State']}', `C5`='{$myrow[2]['Zip']}', `C6`='{$myrow[2]['Phone']}', `D1`='{$myrow[3]['Dealer']}', `D2`='{$myrow[3]['Address']}', `D3`='{$myrow[3]['City']}', `D4`='{$myrow[3]['State']}', `D5`='{$myrow[3]['Zip']}', `D6`='{$myrow[3]['Phone']}', `E1`='{$myrow[4]['Dealer']}', `E2`='{$myrow[4]['Address']}', `E3`='{$myrow[4]['City']}', `E4`='{$myrow[4]['State']}', `E5`='{$myrow[4]['Zip']}', `E6`='{$myrow[4]['Phone']}' WHERE `id`='$callid'", $db); }
  15. I really would like to do something like this: UPDATE TABLE SET `A1`=$myrow["0"][0], `A2`=$myrow["0"][1], `A3`=$myrow["0"][2], `A4`=$myrow["0"][3], `A5`=$myrow["0"][4], `A6`=$myrow["0"][5], `A7`=$myrow["0"][6], `B1`=$myrow["1"][0], `B2`=$myrow["1"][1], `B3`=$myrow["1"][2], `B4`=$myrow["1"][3], `B5`=$myrow["1"][4], `B6`=$myrow["1"][5], `B7`=$myrow["1"][6], etc...... WHERE `id`='$rowid' Is this possible?
  16. I am pulling 5 addresses and I am wanting to store these 5 addresses in columns in a separate table. On the query string I put LIMIT 5. How can I store the results of each of the 5 loops into columns in a separate table? The columns are A1(for name), A2(for address), A3 (for city), A4 (for state), A5 (for zip), A6 (for phone), A7 (for miles), .... then I also have B1-B7, C1-C7, D1-D7, and E1-E7. I am basically wanting to store up to 5 addresses in an array and then update them into a mysql table. foreach ($zips as $key => $value) { $result = mysql_query("SELECT State FROM extreme WHERE Zip = '$key' AND Type='store' AND `InStore` <> 'NO' LIMIT 5", $db); $num_rows = mysql_num_rows($result); while($myrow = mysql_fetch_array ($result)) { $Dealer=$myrow['Dealer']; $Address=$myrow['Address']; $City=$myrow['City']; $State=$myrow['State']; $Zip=$myrow['Zip']; $Phone=$myrow['Phone']; $Miles = $value; } }
  17. Anyone have any ideas? Thanks, Jake
  18. It is not a mysql query.
  19. How can I limit the number of messages returned to 25 and sort them by date? $result = imap_search($mbox,"FROM $customer_email"); echo"<table width=100% border=1>"; foreach ($result as $value) { $mailHeader = @imap_headerinfo($mbox, $value); $from = $mailHeader->fromaddress; $subject = strip_tags($mailHeader->subject); $date = $mailHeader->date; echo "<tr><td>$from</td><td><a href=\"imap_email.php?what=read&eid=$value\" target=\"_blank\">$subject</a></td><td>$date</td><tr>"; } echo"</table>"; imap_close($mbox);
  20. I am trying to link up our e-mails with our little customer communication program I built. So when you pull up a customers account, it will do a imap_search on our employees mailboxes and list all the e-mails pertaining to the customer.
  21. Something like this? foreach($result as $msgno) { $headers = imap_fetchheader($mbox, $msgno); }
  22. I have a connection to my imap account and I would like to use imap_search. I have googled several different things and found stuff that would return the message id or numbers, but I do not know how to return the headers. How can I return headers after using this? $result = imap_search($mbox, 'FROM "[email protected]"');
  23. Hi, I could not find a board for this. So, I figured I would just post it here. I have been using pipeline data since 2007. They keep going up on their fees on top of their yearly fee and yearly $250 PCI compliance fee, and monthly fees. I have the api working great for me in php though. I hate to change. Does anyone have in comments about who would be a good credit card processing company to go with? Thanks, Jake
×
×
  • 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.