Jump to content

Creating Info File With Variables


ShoeLace1291

Recommended Posts

I'm trying to create a file with XML in it which contains user login info.  In my script, a line is inserted that will be one type of user information, for example, <loginname>$username</loginname>.  When the script runs, it actually inserts the characters $username.  How do I make it so it enters in what $username equals, which is $_POST['username'] ?

 

$userinfobody = '<?xml version="1.0"?>\n\<loginname>\"$username\"</loginname>\n\<loginpass>\"$password\"</loginpass>\n\<contactemail>\"$email\"</contactemail>\n\<regdate>\"$todaysdate\"</regdate>';

 

I am also getting a syntax error now at 1.0.

Link to comment
https://forums.phpfreaks.com/topic/76878-creating-info-file-with-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.