Jump to content

jskywalker

Members
  • Posts

    292
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    GMT+1

jskywalker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. php -r '$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y")); echo $tomorrow; ' above is tested on Linux, for some reason, if you are on Windows you should do: php -r "$tomorrow = mktime(0, 0, 0, date('m') , date('d')+1, date('Y')); echo $tomorrow; "
  2. If you save this code in a file named 'check.php' this works: <?php print_r($_POST); ?> <HR> <FORM METHOD="POST" ACTION="check.php"> <input type="submit" value="submit"> <label>PDF Article</label><input name="article_type" value="pdf" type="radio" /> <label>Video Webcast</label><input name="article_type" value="webcast" type="radio" /> <label>Podcast</label><input name="article_type" value="podcast" type="radio" /> </form> which part am i missing ?
  3. and you should NOT do $money = $_GET['money']; just before your query....... @PFMaBiSmAd: you are right about the multiple query's...
  4. this is a SQL question......... (so wrong place of forum?) SELECT * from blog_addresses WHERE link like '%.blogspot.com%';
  5. try changing default charset, in stead of default collation.
  6. no, because if someone posts something like: $money="'; delete form countries" than it would delete the contents from your countries table.......
  7. $file = file_get_contents('http://www.facebook.com/favicon.ico'); file_put_contents('some_local_filename.ico', $file);
  8. an unchecked checkbox is not checked, so there's no need to send it? for this checkbox you can do this: $var1 = (isset($_POST['var1']) ? true : false);
  9. possible, because in the SQL-statement is: 'post_date' which should read: `post_date` The first one (between '') is a string, the second one (with the back-quotes), is a reference to the field named post_date.... and 'post_date' is always > '2010-10-02.....'..
  10. sorry it look this crappy..... But most it is simple SQL, beside some date-formatting in PHP Aboud those data-formats, you can check http://www.php.net/date and everything about MySQL is here: http://dev.mysql.com/doc/refman/5.1/en/index.html So, which part was not clear to you ? :'( ;)
  11. for post this year you have: <?php echo $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND 'post_date' > '" . date("Y") . "-01-01-01 00:00:00'"); if (0 < $numposts) $numposts = number_format($numposts); ?> for posts this month you could do: <?php echo $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND 'post_date' > '" . date("Y") . "-01-01-01 00:00:00' AND `post_date`>'2010-'.date("m").'-01-01 00:00:00'"); if (0 < $numposts) $numposts = number_format($numposts); ?>
  12. oeps, i did mean a 'LEFT JOIN'...... because you want all records from 'locations'
  13. it always send ALL data that you defined in the form, but NEVE the disabled elements... if (isset($_POST['var1])) { $var1 = $_POST['var']; This
  14. change the 'INNER JOIN' to a 'RIGHT JOIN' see: http://dev.mysql.com/doc/refman/5.1/en/left-join-optimization.html
×
×
  • 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.