*****I Have No Idea!*****

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zylkaa
Forum Newbie
Posts: 8
Joined: Mon Mar 23, 2009 7:32 pm
Location: Places

*****I Have No Idea!*****

Post by zylkaa »

So, I have this page, permanent.php that takes the uploaded file name from the file upload form. It creates a permanent page so the uploader can delete the file at any time (Permanent Delete Page). I have a problem on line 5. That is where I want to put the Permanent Delete Page in a variable ($cpage). I want to redirect to the page that was just created as you can see in Red, below.

permanent.php:
<?php
if(isset($_GET['file'])) $page=$_GET['file'];
else $page=rand();
$filename = $_GET["uploaded"];
$cpage = ['.$page.".php']

$out = fopen($page.".php", "w");
if (!$out) {
die("Could not create file. Try your upload again.");
}

fwrite($out,"<b>$filename</b><br />Delete Code Here");
fclose($out);
?>
<?php
header( 'Location: http://www.filefetchers.co.cc/$cpage' ) ;
?>


Thanks for your help,
Alex
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: *****I Have No Idea!*****

Post by jaoudestudios »

$cpage = ['.$page.".php']
????????
try...

Code: Select all

$cpage = $page.'php';
Post Reply