Jump to content

PlayItAgain

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PlayItAgain's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am going to give this shit 1 last shot. I would appreciate it if people stop giving me fuckin manual pages. I can't understand them if it hasn't become obvious by now. I have so far been posting basic versions of what I am trying to do. To gain away any misunderstanding, I am gonna post my real code. You guys seem to know whats going on. So I don't think it will be a strain for your to read (I thought this maybe before which is why I made it basic). $fp = fopen('/opt/index.html', 'r+'); fwrite($fp, '<?php session_start(); $id = "'.mysql_real_escape_string($_POST['id']).'";'); fclose ($fp); This inserts into the following index.html: testusr', 'testpw') or exit("SERVER ERROR"); mysql_select_db('testdb', $link); $query = "SELECT * FROM products WHERE id = '$id'"; ... ... ... I am trying to make the outcome: <?php session_start(); $id = "21"; $link = mysql_connect('testusr', 'testpw') or exit("SERVER ERROR"); mysql_select_db('testdb', $link); $query = "SELECT * FROM products WHERE id = '$id'"; ... ... ... Instead, I get: <?php session_start(); $id = "21"; testusr', 'testpw') or exit("SERVER ERROR"); mysql_select_db('testdb', $link); $query = "SELECT * FROM products WHERE id = '$id'"; ... ... ... See how fwrite is eating into the code. I need this to stop. This is what all of this is about. So, I am trying to line break to get it going to the next line. But I can't! Its driving me nuts!
  2. fuck this pc programming shit. im just gonna pay some cunt to do it. fuck dealing with this shit.
  3. How can I use double quotes with this? I tried reversing the quotes to double quotes, but it doesn't work. This is why the above method doesn't work. fwrite($fp, '<?php session_start(); $id = "'.mysql_real_escape_string($_POST['id']).'";');
  4. I'm confused man.
  5. Double quotes don't work either: $fp = fopen('/opt/numbers.txt', 'w'); fwrite($fp, '1"\n" 2"\n" 3"\n"'); fclose ($fp); ... just gave me: Thanks but!
  6. $fp = fopen('/opt/numbers.txt', 'w'); fwrite($fp, '1\n 2\n 3\n'); fclose ($fp);
  7. $fp = fopen('/opt/numbers.txt', 'w'); fwrite($fp, '1\n'); fclose ($fp); Gives me:
  8. Hi all, I have fwrite() writing to a text file called 'numbers.txt'. The text file content is "23". I learn't fwrite() from the manual, so did: f$fp = fopen('/opt/numbers.txt', 'w'); fwrite($fp, '1'); fclose ($fp); I have used fwrite() to try and make the file content "123", but fwrite() writes over the content of the file, resulting in it just containing "1". I couldn't find anywhere about writing into, rather over, and hoping someone could please help me out.
×
×
  • 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.