i have a script that will write to a text file from a form... using php scripts.. now i need a script to call from this file line by line, or any similar way of posting it, and insert it into my php home page. i have the script set up and working, it posts a headline on say line 1, a news article on line 2, and line 3 is blank. then when i submit again it posts a headline on line 4, a news article on line 5, and line 6 is blank.
the txt file looks as so:
[CODE=text]Heading 1
THis is the news article asociated with heading 1. it is saved as one line in for example news.txt
Heading 2
This is the news for heading 2. it was submitted by for example submit.php and is displayed on index.php in a table.
[/CODE]
now i want this to load as so:
[HTML]<table>
<tr><th>Headi ng 1</th></tr>
<tr><td>THis is the news article asociated with heading 1. it is saved as one line in for example news.txt</td></tr>
<tr><td></td></tr>
<tr><th>Headi ng 2</th></tr>
<tr><td>This is the news for heading 2. it was submitted by for example submit.php and is displayed on index.php in a table.</td></tr>
<tr><td></td></tr>
</table>[/HTML]
pretty simple?
just a few notes: i dont have a working mysql server, if anybody knows a free sql server that i can use that actually works, i need to have a link, otherwise i will stay with text files... help!
Sincerely,
Eragon
the txt file looks as so:
[CODE=text]Heading 1
THis is the news article asociated with heading 1. it is saved as one line in for example news.txt
Heading 2
This is the news for heading 2. it was submitted by for example submit.php and is displayed on index.php in a table.
[/CODE]
now i want this to load as so:
[HTML]<table>
<tr><th>Headi ng 1</th></tr>
<tr><td>THis is the news article asociated with heading 1. it is saved as one line in for example news.txt</td></tr>
<tr><td></td></tr>
<tr><th>Headi ng 2</th></tr>
<tr><td>This is the news for heading 2. it was submitted by for example submit.php and is displayed on index.php in a table.</td></tr>
<tr><td></td></tr>
</table>[/HTML]
pretty simple?
just a few notes: i dont have a working mysql server, if anybody knows a free sql server that i can use that actually works, i need to have a link, otherwise i will stay with text files... help!
Sincerely,
Eragon
Comment