Search found 12 matches

by sleepingdanny
Mon Jun 09, 2003 9:13 am
Forum: PHP - Code
Topic: damn darn carriage return
Replies: 4
Views: 867

Well, you can trim \n, \r with the trim() function...

str_replace("change","to this",$in_this)
by sleepingdanny
Wed May 28, 2003 4:18 am
Forum: PHP - Code
Topic: Finding out current path of script
Replies: 2
Views: 546

This will show you the path to the script you are running:

Code: Select all

_FILE_
by sleepingdanny
Wed May 28, 2003 4:17 am
Forum: PHP - Code
Topic: i need help with the something.php?something
Replies: 5
Views: 694

You can just use this:
:P

Code: Select all

<?php
switch($page){
case "trainers":
print "content";
break;

case "tutorials":
print "content";
break;

// and so on...
?>
by sleepingdanny
Wed May 28, 2003 4:09 am
Forum: PHP - Code
Topic: multipart/form-data
Replies: 2
Views: 476

You don't need to use: $HTTP_FILES_VARS['f1'] You can just write: $f1 :P <?php if(isset($f1)){ echo "ok"; } else{ echo "no"; } ?> &lt;form action="" enctype="multipart/form-data" method="post"&gt; &lt;input type="file" name=&quo...
by sleepingdanny
Tue May 27, 2003 8:59 am
Forum: PHP - Code
Topic: Nuked mailserver without intension. Desperate help request!
Replies: 8
Views: 1488

I don't think that it suppose to that, but you can try using:

<?
$i=0;
$i++;
while($i<100){
mail($to,$subject,$message);
}
?>

This might work, but I don't sure. :P
by sleepingdanny
Tue May 27, 2003 8:54 am
Forum: PHP - Code
Topic: easy php chat
Replies: 8
Views: 1393

You can try using: str_replace(" "," ") for this.
Or you can use: ereg_replace :P
by sleepingdanny
Tue May 27, 2003 8:52 am
Forum: PHP - Code
Topic: $HTTP_Referer
Replies: 6
Views: 1245

Try using a full address, like: http://www.site.com/....
I think that you better ask if the reffer came from a php page and not from a folder like you writed. (url/of/required/referer) :P
by sleepingdanny
Thu May 08, 2003 2:59 am
Forum: PHP - Code
Topic: strange one ">" appears in mail text
Replies: 7
Views: 2234

Why don't you show us the code so we can help you
by sleepingdanny
Tue Mar 25, 2003 9:37 am
Forum: PHP - Code
Topic: Cookies that don't expire?
Replies: 7
Views: 1042

Yu can try :arrow:

Code: Select all

<?
setcookie("CookieName") #without using "time()+"
?>
Just so you'll know "time()+3600" = 1 Hour... :P

Code: Select all

<?
setcookie("CookieName",time()+3600);
?>
by sleepingdanny
Tue Mar 25, 2003 9:27 am
Forum: PHP - Code
Topic: Cookies and localhost
Replies: 3
Views: 795

Try to upload the 2 files that you told us to your site... OR maybe the code can't work because it should look like this :P :arrow: <? setcookie("login") ?> <? if(isset($_COOKIE["login"])){ print "Logged In"; } else{ print "Not Logged In"; } ?>
by sleepingdanny
Thu Mar 20, 2003 4:54 am
Forum: PHP - Code
Topic: Header
Replies: 7
Views: 836

I don't know if this is true because it never happend to me :?
by sleepingdanny
Thu Mar 20, 2003 4:27 am
Forum: PHP - Code
Topic: Header
Replies: 7
Views: 836

More easy explantion: :) "header()" is need to be placed above the <html> tag or it will show the error... 1 ) mysql_close($conexion); 2 ) $vuelta = "inicio.php"; 3 ) header("Location: ". $vuelta); 4 ) exit; <html> <head> ..... The 3rd line is wrong - it should be :arro...