Jump to content


Photo

$filename=$variable


  • Please log in to reply
2 replies to this topic

#1 Webnerdz

Webnerdz
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 27 April 2006 - 08:32 PM

I know the answer is probably right in front of me, but I just cannot figure it out. Can anyone please help me with the syntax here:

if ($i==1){$filename='$crpage';}

$crpage is the variable called from the previous page. When it creates the file it creates a file called $crpage.html in the directory. I just need to figure out why it doesn't create the name that is entered in the form for the $crpage variable.

Thank you all in advance for any assistance you can provide!



#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 27 April 2006 - 08:33 PM

Either use double quotes (") or no quotes at all. Anything enclosed in single quotes is taken as a literal string.

Ken

#3 drdysdy

drdysdy
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 28 April 2006 - 12:53 AM

[!--quoteo(post=369348:date=Apr 27 2006, 03:32 PM:name=Webnerdz)--][div class=\'quotetop\']QUOTE(Webnerdz @ Apr 27 2006, 03:32 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I know the answer is probably right in front of me, but I just cannot figure it out. Can anyone please help me with the syntax here:

if ($i==1){$filename='$crpage';}

$crpage is the variable called from the previous page. When it creates the file it creates a file called $crpage.html in the directory. I just need to figure out why it doesn't create the name that is entered in the form for the $crpage variable.

Thank you all in advance for any assistance you can provide!
[/quote]

Umm, I'm not sure if I understand what you mean but here

if ($i==1){$filename="'$crpage'.html" }

Try that





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users