Re: Input variable from form help request
| From: | Tim Streater | Date: | Thu, 29 Sep 2011 12:55:00 +0000 |
| Subject: | Re: Input variable from form help request | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-315064@lists.php.net to get a copy of this message | ||
On 29 Sep 2011 at 13:30, PHProg <phprog@speedemessenger.com> wrote:
> I'm trying to create a standard web form that will use a PHP script
> to copy a file from one server to another.
[snip]
> <?php
>
> if(!@copy('http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirna
> me']."/".$_POST['trakname']."'))
This line:
if(!@copy('http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirname']."/".$_POST['trakname']."'))
looks like a big mess of single and double quotes to me. Why don't you go through it very
carefully? I'd be inclined to make a small test program separate from the web page stuff and do
things like:
<?php
$_POST['trakname'] = "abc";
// similar for the other two
$myvar = 'http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirname']."/".$_POST['trakname']."';
echo $myvar;
?>
and fiddle until that works.
--
Cheers -- Tim