Jump to content

dlebowski

Members
  • Posts

    262
  • Joined

  • Last visited

About dlebowski

  • Birthday 08/10/1976

Profile Information

  • Gender
    Male
  • Location
    Nerdbraska

dlebowski's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. $account="54646456456464"; $station= "12345"; $options="11-1"; $image="C:/Desktop/Sample Images/usco1.jpg"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://dfdgfsfs.com/kgdfgd.php"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array( 'image' => '@'.$image, 'account' => $account, 'station' => $station, 'options' => $options)); $postResult = curl_exec($ch); curl_close ($ch); $xmlobj = simplexml_load_string($postResult); echo (string)$xmlobj->ID->attributes()->value; echo (string)$xmlobj->FullName->attributes()->value; All, I have spend days trying to figure this out without any luck. I am now in crisis mode. I need to get this working asap. The following code works perfect on my local xampp machine. As soon as I upload it to my web server, I don't get any data back. I have narrowed it down to the image i am trying to send is not being received properly. Thanks in advance.
  2. I understand. I wasn't trying to just tell you "bits at a time". I thought I could figure it out if I had the first part of my question answered. I'm not able to. So what you see in this post is the whole story. Any help would be appreciated. Thanks.
  3. Thank you for the reply! What if I want to specify whether I start with "0" or "100" as my starting point? AND I only wanted it for a certain date. So for example: If I start with "0" and date of 2012-11-15, the next available number is: 3. If I start with "101" and date of 2012-11-15, the next available number is: 103. Also, what if my table looked like this: LotNumber Date 1 2012-11-15 2 2012-11-15 3 2011-10-12 4 2012-11-15 5 2012-11-15 6 2012-11-15 7 2012-11-15 100 2012-11-15 102 2012-11-15 103 2011-10-12 104 2012-11-15
  4. Ok. I have spent a couple of days on this and have had no luck figuring it out. It seems easy enough, but apparently i'm not smart enough to figure it out. Anyway, here is what I want to do: Table "lots" has the following column: LotNumber 1 2 4 5 6 7 100 102 104 Here is my code: $j = mysql_num_rows($res); $i = 0; while ($i++ < $j and mysql_result($res, $i - 1, 0) == $i); This code works great if I need the next available number starting from "0". That value would be "3". But lets say I want to get the next available number starting at 100. How do I do that? For example, the next available number after 100 is "101". I can't get it to do this for me. Any help would be appreciated. Thank you in advance. Ryan
  5. theyear is just a javascript variable that will be used in a function. And when the results are returned, the variable doesn't change. I don't get any errors or anything in firebug. The variable just doesn't change at all. Is that what you were asking me. Thank you for helping me out. Ryan
  6. Any help with this would be greatly appreciated! When I use "response[0].Data" to assign a value to innterhtml, it works great. If I try to assign the value to a javascript variable (theyear = response[0].Data1;), it doesn't assign it. How do I do this? Thank you for your help! Here is the value: [{"Data":"3025.00","Data1":5}] var theyear; function runPost(thedate, thelotnumber, myid) { $jq.post("current.php?q="+moreurl, { data: thedate, data2: thelotnumber, data4: myid }, function(response, status) { document.getElementById("thecurrent").innerHTML = response[0].Data; theyear = response[0].Data1; }, 'json');
  7. Okay. I'm getting closer. Here is my code: var date1, date2, sec, hours, min; window.onload = function () { //MM/DD/YYYY HH:MM:SS PM or AM date1 = new Date("04/12/2011 07:14:00 PM"); date2 = new Date("04/12/2011 07:14:20 PM"); sec = (date2.getTime() / 1000.0) - (date1.getTime() / 1000.0); hours = parseInt(sec / 60 / 60); sec = sec - hours * 60 * 60; min = parseInt(sec / 60); ses = sec - min * 60; calc(); } function calc() { if (hours<=0&&min<=0&&sec<=0) { alert("cool"); } else { sec--; var day=Math.floor(hours/(60*60*1000*24)*1) day.innerHTML = day; hrs.innerHTML = hours; mins.innerHTML = min; secs.innerHTML = sec; setTimeout("calc()", 1000); } } All I need to do now, is just have the hours become days if they are more than 24. For example if hours are 25, this is what it would look like: 1 days 1 hours 1 minute 10 seconds Current it does this: 25 hours 1 minutes 10 seconds Again, any help would be great. Thank you.
  8. I want to be able to take two dates with times and want to show a realtime countdown. I need it to be to the second. For example: Start: Year: 2012 Day: 09 Month: 12 Hour: 10 Minute: 12 Second: 35 End: Year: 2012 Day: 09 Month: 12 Hour: 10 Minute: 13 Second: 45 Displayed: 0 days 0 hours 1 minute 10 seconds I want this countdown realtime on the screen. So far, all of the scripts I have found have been to the minute and also used the client sides clock to determine the countdown. I just need it to countdown in seconds and utilize to specified dates and times. Any help with this would be awesome. Thanks in advance.
  9. I understand what you posted, I'm looking through the php.ini files and comparing them and there is nothing in the MYSQL section that is different. Anyway, I will see what else I can come up with. Thank you. Ryan
  10. If i do that, it WILL work. I am just concerned because I didn't want to have to modify all these scripts to make sure it works. I was hoping I could figure out what is different on this server as oppose to my old one. Ryan
  11. This is how I connect: include("dbinfo.inc.php"); mysql_connect($myserver,$uname,$pword); @mysql_select_db($database) or die( "Unable to select database");
  12. View source displays nothing. What is wierd, is that it works on the other server. I took your advice, and removed the "mysql_real_escape_string" and it works now. So, that is definitely the problem. So, is there a setting in my PHP config that is affecting this on my new server? Thank you for your quick replies. Ryan
  13. This is literally all that is on this page: My URL: myurl.com/editlot.php?LotID=100121361 <? print $LotID=mysql_real_escape_string( $_GET['LotID']); ?> It won't output anything to the screen.
  14. I moved my application to a new server with a new install of PHP. Anyway, some of my "mysql_real_escape_string( $_GET['ID'])" requests work, some do not. Does anyone know why this would be? It works fine on my old server. Thank you. Ryan
×
×
  • 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.