Jump to content

Raphael diSanto

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Raphael diSanto's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You pasted the entire output from var_dump into the SQL, not just the SQL command.
  2. Like it says in the article posted by Bricktop, you can't force a download with a simple <a href> link. The browser's default behavior for that type of file will always take priority. To force a download, you need to direct the user to a script that sends the right headers, and then reads the file from the server and streams it to the browser. The article shows you how to do this.
  3. If that's what the mysql date looks like (i.e. the value of $date in your code), then you need to make sure the php one will come out at the same format, so you'll need something like: date("Y-m-d 00:00:00"); Because string-wise: "2009-09-21 00:00:0" does not equal "2009-09-21" (which is what your original date format would have produced. Uh.. Make sense?
  4. Yes, that's the result of the var_dump. Now take that query and enter it into the database manually. Oh, and please note.. the final value in that query is a null value. Thus $uploadEND is null.
  5. Simplest split is: $queries = explode(");", $fileContents) Then foreach ($queries as $query) .. etc etc
  6. You could ask MySQL to do that for you, I think (I forget how, off the top of my head, but MySQL has some nifty date functions) .. Or, you'd have to do a straight-up text match on it, which would mean you'd have to make sure the date in $date looked exactly like you needed it to look. I forget what MySQL dates look like now, (I usually store dates as unix timestamps, since it's easier to manipulate those - checking for +3 days is as simple as checking for $date+(3 days worth of seconds, whatever that is)) But what you're doing is producing a date from PHP that will look like this: "2009-09-14" (for example) .. PHP will then try a pure text match against whatever the date from MySQL is. If the date from MySQL looks like this: "09/14/2009: 12:34", it won't match, even though technically it's the same day.
  7. You can only send single queries to MySQL using mysql_query, I believe. Thus, you will have to split the file up into the individual queries contained within the file and loop through them and send them individually.
  8. If you run the query against the MySQL database itself, you may get a meaningful error as to why it's not writing to the DB.
  9. http://us.php.net/manual/en/function.mail.php 4th example down. It has both a CC and a BCC in it.
  10. First thing I'd do is var_dump the query itseld, then try running it manually at an SQL prompt, see what the database says. Do: $query = ""INSERT INTO tickets VALUES (NULL,'$username','$subject','$summary', '$status', '$progress', '$issue', '$replied','$uploadEND')"; var_dump($query); then cut and paste the output into a direct MySQL prompt. If you don't have shell access to the MySQL server, use phpMyAdmin or something. You can't always rely on "mysql_query() or die" to barf out if there's an error.
  11. Hey y'all.. New to the form, been hacking at PHP since the late 90s, but.. Definitely new to SOAP.. So, I need to formulate a SOAP request that looks like this: <mynode foo="bar">Stuff</mynode> Using PHP5's built in SOAP routines.. Did some digging online and I found this array structure to pass in: array( "mynode" => array( "_" => "Stuff", "foo" => "bar" ) ); (It was from a user-posted comment on the SOAP documentation page on the official PHP docs site) ... 'cept, when I do that, I get this: <mynode> <item> <key>_</key> <value>Stuff</value> </item> <item> <key>foo</key> <value>bar</value> </item> </mynode> .... which is ... less than helpful. Is there some kind of option I should be passing the SoapClient when I'm instantiating it? Any help would be much appreciated! Thanks!
×
×
  • 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.