Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Just store the date they paid up to, so time()+(30*24*60*60) for 30days Or the date they paid, and the type of account (30 days / 1 year / etc)
  2. echo $CV, $this refers to this object!
  3. You could use MySQL or a flatfile.. this really isn't the place to request "where can I find XYZ", When you say a link as been clicked, do you mean a link TO your site or a link ON your site, also how are the links being generated, also why not have a redirect or something added to the URL..
  4. 1. Create a login system, 2. add groups 3. apply to viewable options try googling for "php create login system" that should get you started
  5. You can't have a field of a "NOW()" type! you can have a timestamp field, (which i refered to in my previous post) in any case if you search using NOW() or CURDATE() on a date field on will reveal the same results, ie NOW() would return something like this 2009-06-24 01:28:11 But CURDATE() would return something like this 2009-06-24 as would DATE(NOW()) return 2009-06-24
  6. strtotime('0000-00-00 00:00'); should return false! considering this bug was fixed 2 years ago you should really update!
  7. 1. the Error is telling you the problem! 2. use CODE tags 3. don't bump without giving more information 4. you could just omit the error ie if (@file($attach) && $attach_size>10000000) $msg="File size should not be more than 10 MB."; or if (!empty($attach) && file($attach) && $attach_size>10000000) $msg="File size should not be more than 10 MB.";
  8. @J.Daniels: Now() has been checked (see previous posts) However I agree that using CURDATE(), instead of NOW() maybe a good idea, but any schedule after the current time will stay in the list! @debecc Okay the main part of the query is this WHERE schedule.`date` >= NOW() Now, this should be working, but that assumes the date field is a timestamp, if its a date field then change NOW() to CURDATE() or the date field to a timestamp, Also how are you inserting the record, the correct way should be using NOW() as well, and last but not least, any records created and outside of the current server may not work on the new server so re-create them, if this the new ones work we can look at updating the old ones
  9. This is one of those questions we we need more info.. basically your need to check where the problem is.. check the data in the database or truncate the data and test it, you say is not displaying things but are the dates correct ? etc
  10. Use pfsockopen()
  11. Run this SELECT NOW() as today on both servers this will give you the time, your probably find the times are different
  12. The GET is validated via the $valid array, so if something that's not in that array is used it will fail you could clean it up a little by also adding default ie <?php $valid = array("Home","Admin","Profile","etc"); if(isset($_GET['Page']) && in_array($_GET['Page'],$valid)) { include "../Hidden/".$_GET['Page']".php"; }else{ include "../Hidden/index.php"; //or failed.php (whatever!) } ?>
  13. try this <script type="text/javascript"> <!-- function formatText(el,tagstart,tagend) { if (el.setSelectionRange) { el.value = el.value.substring(0,el.selectionStart) + tagstart + el.value.substring(el.selectionStart,el.selectionEnd) + tagend + el.value.substring(el.selectionEnd,el.value.length) } else { // IE code here... } } //--> </script> <form name="my_form"> <input type="button" value="BOLD" onclick="formatText(document.getElementById('myta'),'<b>','</b>')"/> <textarea id="myta" rows="10" cols="30"></textarea> <input type="submit" value="SUBMIT" /> </form>
  14. This works with file and domains <?php $url = "http://www.phpfreaks.com"; if( !is_numeric(xfile_404($url)) ) { echo "Found: $url<br>"; } function xfile_404($file){ $file = ereg_replace(' +', '%20', trim($file)); if(substr($file, 0, 7) !== "http://"){ $file = "http://" . $file; } $domain = substr($file, 7); $domain_ext = strtoupper(array_pop(explode('.', substr($domain, 0, strpos($domain, '/'))))); $file_headers = @get_headers($file); if(!$file_headers){ return 3; break; }if($file_headers[0] == 'HTTP/1.1 404 Not Found') { return 404; }else{ return ereg_replace('%20', ' ', $file); } } ?>
  15. I thought the login got posted to http://xxxxxxx.net/index.php?action=login2 on SMF forum
  16. your need to put the form in the loop <?php session_start(); /** * @author Grant Kinsman * @copyright 2009 */ $b = count($_SESSION['cart']); if ($_POST['remove']) { if(isset($_SESSION['cart'][$_POST['Item']])) { unset($_SESSION['cart'][$_POST['Item']]); $_SESSION['prod']--; } } ?> <html> <head> <title>Mums Cards</title> <link rel="stylesheet" href="style.css" style="text/css" /> </head> <body> <div id="titleBar"> <p class="shopCar"><b>Cart</b><br> Items - <?php echo $_SESSION['prod']; ?><br> Total - £<?php echo $_SESSION['total']; ?> <a href="checkout.php" style="padding-left=0px">Checkout</a></p> </div> <div id="menu"> <a href="index.php">Home</a> <a href="products.php">Products</a> </div> <div id="main"> <div id="checkOut"> <?php foreach ($_SESSION['cart'] as $name => $id) { echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">"; echo "<div class='check'>"; echo "<img src='" .$id['image']. "' class='check2'>"; echo "Order No: " .$id['orderNo']. "<br>"; echo "Quantity: " .$id['quantity']. "<br>"; echo "Unit Price: &#65505;" .$id['price']. "<br>"; echo "Info: " .$id['info']. "<br>"; echo "<input type='hidden' value='$name' name='Item'>"; echo "<input type='submit' value='remove' name='remove'>"; echo "</div><br>"; echo "</form>"; } ?></div> </form> </div> </body> </html> or use a checkbox selection ie <?php session_start(); /** * @author Grant Kinsman * @copyright 2009 */ $b = count($_SESSION['cart']); if ($_POST['remove']) { foreach($_POST['Items'] as $Item) { if(isset($_SESSION['cart'][$Item])) { unset($_SESSION['cart'][$Item]); $_SESSION['prod']--; } } } ?> <html> <head> <title>Mums Cards</title> <link rel="stylesheet" href="style.css" style="text/css" /> </head> <body> <div id="titleBar"> <p class="shopCar"><b>Cart</b><br> Items - <?php echo $_SESSION['prod']; ?><br> Total - £<?php echo $_SESSION['total']; ?> <a href="checkout.php" style="padding-left=0px">Checkout</a></p> </div> <div id="menu"> <a href="index.php">Home</a> <a href="products.php">Products</a> </div> <div id="main"> <div id="checkOut"> <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <?php foreach ($_SESSION['cart'] as $name => $id) { echo "<div class='check'>"; echo "<img src='" .$id['image']. "' class='check2'>"; echo "Order No: " .$id['orderNo']. "<br>"; echo "Quantity: " .$id['quantity']. "<br>"; echo "Unit Price: &#65505;" .$id['price']. "<br>"; echo "Info: " .$id['info']. "<br>"; echo "<input type='checkbox' value='$name' name='Item[]'>"; echo "</div><br>"; } ?> <input type='submit' value='remove' name='remove'> </form></div> </form> </div> </body> </html>
  17. Your welcome, can you click topic solved bottom left
  18. Erm.. file_put_contents();
  19. I assume you mean something like this <?php session_start(); /** * @author Grant Kinsman * @copyright 2009 */ $b = count($_SESSION['cart']); if ($_POST['remove']) { if(isset($_SESSION['cart'][$_POST['Item']])) { unset($_SESSION['cart'][$_POST['Item']]); $_SESSION['prod']--; } } ?> <html> <head> <title>Mums Cards</title> <link rel="stylesheet" href="style.css" style="text/css" /> </head> <body> <div id="titleBar"> <p class="shopCar"><b>Cart</b><br> Items - <?php echo $_SESSION['prod']; ?><br> Total - £<?php echo $_SESSION['total']; ?> <a href="checkout.php" style="padding-left=0px">Checkout</a></p> </div> <div id="menu"> <a href="index.php">Home</a> <a href="products.php">Products</a> </div> <div id="main"> <div id="checkOut"> <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <?php foreach ($_SESSION['cart'] as $name => $id) { echo "<div class='check'>"; echo "<img src='" .$id['image']. "' class='check2'>"; echo "Order No: " .$id['orderNo']. "<br>"; echo "Quantity: " .$id['quantity']. "<br>"; echo "Unit Price: £" .$id['price']. "<br>"; echo "Info: " .$id['info']. "<br>"; echo "<input type='hidden' value='$name' name='Item'>"; echo "<input type='submit' value='remove' name='remove'>"; echo "</div><br>"; } ?></form></div> </form> </div> </body> </html>
  20. You can't "auto save" to the clients PC (thats a security risk), but you could save it on the server!
  21. your settings are in the httpd.conf
  22. Something like this should do it <?php $tables = array("table1", "table2","etc"); $data = array(); foreach($tables as $table) { echo "$table<br>/n"; $result = mysql_query("SELECT * FROM $table"); echo "<pre>"; while ($row = mysql_fetch_assoc($result)) { var_dump($row); //$data[$table][] = $row; //Capture data } echo "</pre>"; echo "<br>/n"; } //var_dump($data); //show all data ?> EDIT: added a capture array (commented out)
  23. Captcha will stop Blind IP Spoofs, as for rigging a poll, well you could just require membership maybe even require a minimum of 10 posts and and unique email.. yes they could still do it but it takes longer in any case this is an old solved thread.. so their probably not much point making suggestions now
×
×
  • 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.