Jump to content

variables disappear entirely


XpertWorlock

Recommended Posts

The script creates a file, although when it creates it.  the variable changes in the newly created file.

 

$row = (mysql_fetch_array($result));

 

when the file is created, the below is the only thing that shows up.

 

 = (mysql_fetch_array());

 

what could cause this?

 

it goes for all variables in the code, if you need the whole thing, it is below.

 

$Content = ("

<?php

include 'siteLayout.php';

dbConnect();

$result = mysql_query('SELECT * FROM users WHERE userName == '$signUpName' ');

$row = (mysql_fetch_array($result));

if(mysql_num_rows($result)==0){
   echo 'No results';
  };
  

mysql_query('INSERT INTO users (userName, userPassword, userEmail) 
VALUES ('$signUpName', '$signUpPassword', '$signUpEmail')');

echo '<table border='1'><tr><td>
Your account has been activated.<br><br>Please log in.
</td></tr></table>';
?>

\r\n"); 

$handle = fopen($fileName, 'x+'); 
fwrite($handle, $Content); 
fclose($handle); 

Link to comment
https://forums.phpfreaks.com/topic/123196-variables-disappear-entirely/
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.