Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. having read this http://support.google.com/mail/bin/answer.py?hl=en&answer=78799 and successfully connecting myself as I said in my last post - yeah, we're sure
  2. that's just really lazy coding, see what this get's you back, after you change the bits in <> for the if at the end. function previously_liked ($article_id) { $article_id = (int) $article_id; $sql = "SELECT COUNT(`like_id`) FROM `likes` WHERE `like_id` = {$_SESSION['user_id']} AND `article_id` = $article_id"; $qry = mysql_query($sql) or die("could not perform the following query:<br>\n $sql<br>\n <br>\n The folowwing error was returned from the server:<br>\n".mysql_error()); $result = mysql_result($qry) if ($result == <whatever your trying to do>){ $result = <whatever you want it to be>; } else{ $result = <the other thing>; } return $result; }
  3. your web pages are in a folder not on your webserver?
  4. yip, <?php /** You PHP Code */ ?> Your HTML <?php /** More PHP Code */ ?> BUT there are other ways, fling this into a new php file and run it: <?php $var = "variables"; $message = <<<HTML_MSG <html> <head><title></title></head> <body> <p>You'll find these string blocks rather handy at times like this</P> <table border="1"> <tr> <th colspan="2">Easy way to use string blocks in php</th> </tr> <tr> <td>1: make a variable and set it = to</td> <td>2: Openm the string block with <<<NAME_OF_BLOCK using that format(no spaces)</td> </tr> <tr> <td>3: Enter your formated string, including php $var if you want them</td> <td>4: Close the string block with NAME_OF_BLOCK; - on it's own line with no white space before or after it</td> </tr> </table> </body> </html> HTML_MSG; echo $message; ?>
  5. erm....what?
  6. I used this to connect to my gmail successfully: $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "[email protected]","MyEmailPassword", OP_READONLY) or die ("can't connect: " . imap_last_error());
  7. how about this? (You will need to change the <[email protected]> to an actual email address without the <> around it) $mbox = imap_open ("{imap.gmail.com:993/imap/ssl/authuser=<[email protected]>}INBOX", "username","password", OP_READONLY) or die ("can't connect: " . imap_last_error()); your /novalidate-cert/norsh switches are for self signed servers, I'm pretty sure google has an authorised certificate or 10 so this isn't needed.
  8. ...and the error is???
  9. As your post was to comment on your comments, all I'd suggest is maybe including a doc block for each class with the declarations in it. I've just started looking into the OOP side of things myself and one of the things I have come accross is that, in some API implimentations, these doc blocks are really rather important for some DI patterns. One of the newer (newest?) ZEND releases can be coded to build refferences automaticly using the doc blocks as a kind of catalogue (that's my interpretation anyway, but like I said I'm new to this OOP thing too) for building the DI relations. I suck at OOP, having just started playing with it and coming from more than a few years in the procedural world, so I can't really say more than that. I'm sure one of the better programmers will corect what I've got wrong and clear up the bit's I didn't.
  10. what are the forms on the remote end? are they your own forms or proprietry for the domain? Gonna need to know more about what you are working with to establish an accurate solution. Can we see some sample form code? Have you thought about embeding the forms in your own page(s)?
  11. Why would you think to store dates as anything other than a date datatype? Best way to fix your problem is to fix your data.
  12. try TRUNCATE (tablename)
  13. From what I read here: http://forumtopics.org/busobj/viewtopic.php?p=699540&sid=f419f6d2af088d5120d21f7908cc859d There is no way to link directly, but it can be done with a SOAP connection to a java web service
  14. Sorry, I don't follow
  15. Nothing about anything you said explains why you would need to carry a session accross domains. Why does it need to be a session? Why do the scripts need to be on different domains?
  16. $updCount = mysql_affected_rows($update_postcodes); echo $updCount; mysql_affected_rows() returns the number of rows affected by an update/insert query, kind of like mysql_num_rows() does for select queries.
  17. Kind of. It does sounds large if your thinking about it in human terms, like sheets of paper, or post-it notes sticking on your desk. For a databse, as long as there is sufficient disk space and it's set up right at the start, it's actualy really small (how many entries do you think the google DB has in a given table?). And before long term concerns creep in, you can always archive the records off into a series of aged tables every day/month/year/decade depending on what's easiest for your requirement.
  18. looks spot on
  19. Date field identifier would be my method of choice
  20. it means you trying to push 6 valies into 5 fields. You only list 5 fields in your insert, and have 6 values, you missed out the details column name.
  21. change this: $productMatch = mysql_num_rows($sql); // count the output amount if ($productMatch > 0){ to this: if(mysql_num_rows($sql)){
  22. Personaly I use echo "<tr><td>$var1</td></tr>"; without the . concat you're using
  23. you will either need to add a submit button to the form or use a javascript/AJAX onChange event handler. You also really should close that first OPTION that you hardcoded into the HTML.
  24. try $timestamp = $myrow["t_stamp"]; $format='F j, Y, g:i a'; $formatedTime = date($format, strtotime($timestamp));
×
×
  • 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.