Jump to content

Will Hunter

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Will Hunter

  • Rank
    Newbie
  1. So I would only need to redefine the variable inside the function?
  2. That partially worked. // Create profile page. function createProfile() { $handle = fopen($username.".php", 'w'); $pageContent = "<!DOCTYPE html> <head><title>The title has changed.</title></head>"; fwrite($handle, $pageContent); } createProfile(); ^ This code put the content in the page, but didn't name the file with the variable $username.
  3. Hello. I am currently editing my register.php file, which creates the user's account, but also at the same time makes a new file - their profile page. Here is the function: // Create profile page. $handle = fopen($username.".php", 'w'); $pageContent = ""; function createProfile() { fwrite($handle, $pageContent); } createProfile(); This function works, but not when I put this code inside -> https://pastebin.com/9j3rR12v. I have tried to swap all of the " for ' but it doesn't work. What happens is the register.php page does not load at all. I
×
×
  • Create New...