Jump to content

skidz

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by skidz

  1. make sure your parent directory has 777 chmod and try setting some prams to mkdir("dir","755") for instance
  2. i use phpmailer class for this.... it's extremely simple if you wanted to try it out!
  3. $value = str_replace(' ','',$value); to remove white space and mkdir() to create directories.... www.php.net/str_replace | www.php.net/mkdir
  4. $MM_redirectLoginSuccess = "list.php?user=<?php echo $row_rsUsers['username']; ?>"; change to $MM_redirectLoginSuccess = "list.php?user=".urlencode($row_rsUsers['username']);
  5. you could of echo'd your query to see if everything was ok with it, its always my first point of call when something goes wrong!
  6. hi giraffemedia... i like to use the following structure for update forms: <?php $id = $_GET['id'] + 0; switch($_GET[action]){ $query = "SELECT * FROM `wherever` WHERE `id`='$id'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result); echo "<form action=\"?action=process\" method=\"post\">"; echo "<input type=\"text\" name=\"whatever\" value=\"".$row['whatever']."\" />"; break; case 'process': $whatever = mysql_real_escape_string($_POST['whatever']); $query = "bla bla bla"; break; } ?>
  7. <?php function dirList ($directory) { $results = array(); $handler = opendir($directory); while ($file = readdir($handler)) { if ($file != '.' && $file != '..') { $results[] = $file; dirList($directory); } } closedir($handler); return $results; } $results=$_POST['results']; $dir = "c:\php"; $files = dirList($dir); foreach ($files as $file) { echo "<a href=\"$file\" title=\"$file\">$file[/url]</a>"; } ?> no closing <a> tag
  8. mysql_real_escape_string() does exactly what it does on the can... It escapes $_POST's amongst other things correctly so you can't get the dreaded sql injection with ' or 1=1 etc try reading: www.php.net/mysql_real_escape_string
  9. try: if(strpos($_SERVER['HTTP_HOST']) !== 'www.mysite.com') { // do french stuff } else { // do english stuff }
×
×
  • 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.