Jump to content

DylanBlitz

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

About DylanBlitz

  • Birthday 07/07/1970

Contact Methods

  • Website URL
    http://www.buxombombshells.com

Profile Information

  • Gender
    Not Telling
  • Location
    OC Baby!

DylanBlitz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. oh, so your talking about files on your local computer? Not located on the server? Uploading the file is fairly easy. What do you want to do with it once it's on the server? Are you looking to upload only text files then manipulate them once they're there?
  2. what do you mean by a file picker? You mean a way for the user to select a file and then open it?
  3. Here is the php.net example <?php // get contents of a file into a string $filename = "/usr/local/something.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); ?> http://www.php.net/manual/en/function.fread.php
  4. I'd try and see if this will help. if(mkdir($thisdir ."/$login" , 0755, true)) { chmod($thisdir ."/$login", 4755); }
  5. I'd do it like this $matho = array('+', '-', '*'); $math_var = $matho[rand(0, 2)]; switch ($math_var) { case '+': echo $number1 + $number2; break; case '-': echo $number1 - $number2; break; case '*': echo $number1 * $number2; break; }
  6. I'm not the best at .htaccess rewrite's and I'm running into a problem with a clients site. I have a site I setup and it's worked everywhere else with this in the .htaccess Options +FollowSymlinks RewriteEngine on RewriteRule ^p_(.*) view_profile.php?urlname=$1 The problem is that on this person's site they already have some rewrites in their .htaccess and mine just isn't working. Can anyone tell me where I need to start looking to see why mine doesn't work now? Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^$ [OR] RewriteCond %{HTTP_HOST} ^www.$ RewriteRule ^(.*)$ http://clintstang.com [R=301,L] RewriteEngine On RewriteRule ^(sitemap.*\.(xml\.gz|txt))$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteEngine On RewriteRule ^p_(.*) view_profile.php?urlname=$1
  7. Are you talking about a DHTML tree script? Works kind of like windows explorer. If you are then there's a ton out there. I'd download a free one and teach yourself how to do it yourself.
  8. If you have any ' like with you're you have to escape it, you\'re
  9. ok, what does it do when you add the extra code?
  10. Glad you got it figured out realjumper. Sorry I couldn't be more help before, only connected to LDAP with things other then PHP.
  11. Since the email verification is a function you have to call it. Functions don't do anything unless you say hey, I need you to work! :) [code] $mailto = email@address.com; $subject = "Feedback" ; $formurl = "index.html" ; $errorurl = "application-error.html" ; $thankyouurl = "_application.html" ; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $name = $_POST['name'] ; $from = $_POST['from'] ; $location = $_POST['location'] ; $http_referrer = getenv( "HTTP_REFERER" );   if (!isset($_POST['from'])) { header( "Location: $formurl" ); exit ; } if (empty($name) || empty($from)) {   header( "Location: $errorurl" );   exit ; } function valid_email($from) {   // check an email address is possibly valid   if (ereg('^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$', $from))   return true;   else header( "Location: $errorurl" ); exit ; } $email_err = valid_email($from); if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $from ) ) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "Enquiry from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name: $name\n" . "Email: $from\n" . "Location: $location\n" . "Interested in: $interested\n" . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$from\" <$from>" . $headersep . "Return-Path: \"$name\" <$from>" . $headersep . "Reply-To: \"$from\" <$from>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ;[/code]
  12. Ok, I'm bad with expressions. I have this that I pulled off php.net for replacing the text to include a url. I have a page that people can post msgs to. I want to automatically create links out of text so I used the bbcode style for them to specify if it's a url. [code]$text = preg_replace("/\[url=(\W?)(.*?)(\W?)\](.*?)\[\/url\]/", '<a href="$2">$4</a>', $text);[/code] works great if they do it like [code][url=http://www.somesite.com[Click here&[/url][/code] but if they just do [code][url]http://www.somesite.com[/url][/code] it doesn't work. any clue what I need to do to fix it? Or should I go about it another way?
  13. ah, see, always something other then what you thought the problem was lol. Glad to help out.
  14. This will tell you if something is wrong with the statement. [code]$result = mysql_query("SELECT gid.name, testbracket.points FROM testbracket LEFT JOIN gid ON testbracket.gid = gid.gid"); if (!$result) { echo mysql_errno().": ".mysql_error()."\n"; exit; } while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {   $name = $row['name'];   if (!$data[$name]) {     $data[$name] = $row['points'];   } else {     $data[$name] += $points;   } }[/code]
  15. the market table does have a race column right?We're problaby just missing something simple, a variable set wrong somewhere, that's why I'm asking you to output it all. Try something I forgot, if there's more then 1 row you need to loop through the results heh. [code] echo 'IID is:' . $inventory3[IID] . '<BR>'; $race_query = mysql_query("SELECT * from market where ID='$inventory3[IID]'"); for ($i = 0; $i < mysql_num_rows($race_query); $i++) { $race_fetch = mysql_fetch_assoc($race_query); $race_data = $race_fetch['race']; echo 'Database race is: ' . $race_data . '<BR>'; $racearray = explode(", ", $race_data); echo 'Race Array:<BR><pre>' . print_r($racearray,true) . '</pre>'; } echo '<BR><BR><BR>Users race is: ' . ($userstats3['race'] . '<BR>'; exit; if (isset($equip)) { if ($userstats3['race']==$race||$race=='All') { [/code]
×
×
  • 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.