Search Results

Search found 2 results on 1 pages for 'user364333'.

Page 1/1 | 1 

  • PHP New Line will not work

    - by user364333
    Hi I am trying to create some code that first reads the existing contents of the file in and then adds the new line of code on a new line but the code i am using just adds it on the new text on to the already existing line instead of the new line... Here is the code i am using: <?php $id = $_GET['id']; $userfile = "user1.txt"; $fo = fopen($userfile, 'r') or die("can't open favourites file"); $currentdata = fread($fo, filesize($userfile)); fclose($fo); $fw = fopen($userfile, 'w') or die("can't open favourites file"); $currentprocessed = "$currentdata\n"; fwrite($fw, $currentprocessed); fwrite($fw, $id); fclose($fw); ?> I have tried a whole range of different ideas but nothing has worked, any help would be appreciated.

    Read the article

  • PHP MySQL Insert Help

    - by user364333
    Hey I am trying to make a page that inserts some strings into a MySQL table but it just dosn't seem to be working for me. Here is the code I am using at the moment. <?php mysql_connect($address, $username, $password); @mysql_select_db($database) or die("Unable to select database"); $query = "insert INTO user (movieid, moviename)('" . $id . "','" . $name . "') or die(mysql_error())"; mysql_query($query); mysql_close(); ?> Where am i going wrong?

    Read the article

1