
shaunrigby
Members-
Posts
196 -
Joined
-
Last visited
Never
Everything posted by shaunrigby
-
[SOLVED] Help Setting Up Dynamic Content With PHP
shaunrigby replied to bicho83's topic in PHP Coding Help
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... -
<?php $query = "SELECT * FROM `table` WHERE `column` = $variable"; $result = mysql_query($query); ?>
-
<br> <a href="/addtocart.php?id=<?php print $product_id; ?>">Link</a> </tr>
-
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 ../)
-
Notice: Undefined variable: idstud in c:\program files\eas.....
shaunrigby replied to pontiac007's topic in PHP Coding Help
What is the purpose of this line?? @$_SESSION['idstud']=$_SESSION['idstud']; -
<?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
-
A Safer option would be to use the mySQL function COUNT, tutorial found here; http://www.tizag.com/mysqlTutorial/mysqlcount.php
-
Have you tried adding your SMTP server to SNDS?
-
use rand(min no,max no)
-
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?
-
<? $result = shell_exec("ping webserver") if($result > 0){ //forward to online server } else { //forward to mirror }
-
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
-
Oh, no error message, just my e-mail address wasnt enlisted on the IP entered for my mailserver
-
Please exsplain the timstamp segment of numbers cheers.
shaunrigby replied to redarrow's topic in PHP Coding Help
That works out how may seconds in a week(i think), 7 days * 24 hours * 60 minutes * 60 seconds ( -
What is the error message?
-
I would reccomend to the mod for this post to be made sticky as itmay solve a lot of hotmail problems.
-
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 }
-
WordPress is a good blog system, bit awkward to set up, but none the less is pretty efficient and customisable
-
Yes that is what you can do, have you tried adding your SMTP server IP to the SNDS Network?
-
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.
-
<?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
-
uploading selected choice from dropdown menu to database
shaunrigby replied to blui's topic in PHP Coding Help
<? $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()) -
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
-
use mysql_close() in your scrips when you have finished with your connection
-
Use CSS Style Sheets