Jump to content

shaunrigby

Members
  • Posts

    196
  • Joined

  • Last visited

    Never

Everything posted by shaunrigby

  1. More dynamic option would be to use a database, assign a unique ID to each page and create a function to find the page content with that ID number and include it...
  2. <?php $query = "SELECT * FROM `table` WHERE `column` = $variable"; $result = mysql_query($query); ?>
  3. <br> <a href="/addtocart.php?id=<?php print $product_id; ?>">Link</a> </tr>
  4. use ../ if you have a file in another folder eg web/site/index.php if you have files in the same folder eg/web/index.php | /web/config.php then you oly need to use index.php (without the ../)
  5. What is the purpose of this line?? @$_SESSION['idstud']=$_SESSION['idstud'];
  6. <?php include("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); if(isset($_GET['hacksid'])) { $hacksid = $_GET['hacksid']; $query = "SELECT hackname, mimetype, filedata FROM hacks WHERE hacksid = '$hacksid'"; $result = mysql_query($query) or die('Error, query failed'); list($hackname, $mimetype, $filedata) = mysql_fetch_array($result); header("Content-Disposition: attachment; filedata=$hackname"); header("Content-length: $filedata"); header('Content-Type: application/force-download'); //Try this line header("Content-Transfer-Encoding: binary"); //And this
  7. A Safer option would be to use the mySQL function COUNT, tutorial found here; http://www.tizag.com/mysqlTutorial/mysqlcount.php
  8. Have you tried adding your SMTP server to SNDS?
  9. use rand(min no,max no)
  10. Google meta refresh to auto-refresh a page and send it to a different link, just out of curiousity what are you trying to do?
  11. <? $result = shell_exec("ping webserver") if($result > 0){ //forward to online server } else { //forward to mirror }
  12. No harm in trying, submit your SMTP server IP address, if you cannot find your email address in the list try the IP of your domain, eg ping phpfreaks.com
  13. Oh, no error message, just my e-mail address wasnt enlisted on the IP entered for my mailserver
  14. That works out how may seconds in a week(i think), 7 days * 24 hours * 60 minutes * 60 seconds (
  15. What is the error message?
  16. I would reccomend to the mod for this post to be made sticky as itmay solve a lot of hotmail problems.
  17. switch ($_POST[store]) { case 1: $stadr = "1234 duffy ave"; $cszip = "New York, NY"; $phnum = "111-222-3333"; break; case 2: $stadr = "1234 duffy ave"; $cszip = "New York, NY"; $phnum = "111-222-3333"; break; //etc }
  18. WordPress is a good blog system, bit awkward to set up, but none the less is pretty efficient and customisable
  19. Yes that is what you can do, have you tried adding your SMTP server IP to the SNDS Network?
  20. use ini_set() and ini_restore() Im not too sure about how Smart Network Data Services works, best option would beto read the FAQ i posted a couple of posts up.
  21. <?php //Add this code to your index page if(isset($_REQUEST['pageid'])){ $pageID = addslashes(mysql_escape_string($_REQUEST['pageid'])); loadPageContent($pageID); } else { loadPageContent(9295); } //Add this to a function definition page function loadPageContent($pageID){ mysql_connect($dbAddress,$dbUsername,$dbPassword) or die("Error: " . mysql_error()); mysql_select_db($dbSchema); $contentQuery = mysql_query("SELECT `pagelink` FROM `website_content` WHERE `pageid` = $pageID LIMIT 1") or die("Error: " . mysql_error()); $contentLink = mysql_fetch_array($contentQuery); $returnedPages = mysql_num_rows($contentQuery); if($returnedPages > 0){ if(file_exists("content/" . $contentLink['pagelink'])){ include 'content/' . $contentLink['pagelink']; //$pageContent = file_get_contents("content/" . $contentLink['pagelink']); //print $pageContent; } } else { loadErrorPage(); } } ?> NOTE: DONT FORGET TO INCLUDE YOUR FUNCTIONS PAGE IN YOUR INDEX PAGE
  22. <? $sql = "INSERT INTO `table`(`indeximage`) VALUES (`" . mysql_escape_string($_POST['imagelist']) . "`) LIMIT 1"; $queryResult = mysql_query($sql) or die("An error has happened: " . mysql_error())
  23. The MSN junk mail filter is systematic, follow thie link , https://postmaster.live.com/snds/addnetwork.aspx, and add your SMTP server IP address, if you use more than 1 enter the range. FAQ for the service can be found here; https://postmaster.live.com/snds/FAQ.aspx i am pretty sure that this is the answer, i have this problem, and because i do not have a dedicated server i am unable to do it because my smtp server is shared, and according to my web host ihave to supply my own SMTP server, good news is tho there are many free smtp severs out there
  24. use mysql_close() in your scrips when you have finished with your connection
  25. Use CSS Style Sheets
×
×
  • 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.