Jump to content


Photo

fwrite?


  • Please log in to reply
2 replies to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 24 July 2006 - 01:04 AM

How would I make a form, that would write its contents to certain lines of a PHP file?

So for instance

Db name: textbox1
db user: textbox2
dbpass: textbox3

table prefix: textbox4

then the file config.php

$dbname = "
textbox1
";

$dbuser = "
textbox2
";

$dbpass = "
textbox3
";

$prefix = "
textbox4
";

then the select db, and mysql_connect
]

any ideas?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 24 July 2006 - 01:13 AM

You would need to put each line into an array element, then loop through and write the file.

#3 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 24 July 2006 - 04:14 AM

a tutorial or anything?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users