Hello, I ran into a problem trying to create a file named after a table in the mysql database. The table name is stored in a variable called $tablename, and the filename should thus be, $tablename.php.
for example, a table called guestbook should create a file named guestbook.php.
But using the code below it creates guestbookphp. I don't know how to insert the dot.
Thank you in advance.
<?php $filename = $tablename.php; $fp = fopen($filename, 'x'); fwrite($fp, '1'); $data = fread($fp, 512); echo $data; fclose($fp); ?>