473,383 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

basic tutorial

hi

I am after a basic tutorial that uses PHP to create a web page from a
text file.

All i can find it PHP tuorials that include MySql and I dont need that
just yet. I am in urgent need of sorting this quickly and more
learning can come later.

I do have a script http://www.8thrallycross.co.uk/bnb/bnbform.html

that takes all the info for booking in and places it in a text file
(simulated) at http://www.8thrallycross.co.uk/onlinebooking2.shtml

and what I need to do is get the required info across to a web page
similar to this.

http://www.8thrallycross.co.uk/onlinebooking.shtml

Any help and advice appreciated
Regards Andy T

--
For users by users - BY-users group
<http://www.by-users.co.uk>
Jul 17 '05 #1
3 1669
"Andy T" <an**@westmidland-internet.co.uk> wrote in message
news:7l********************************@4ax.com...
hi

I am after a basic tutorial that uses PHP to create a web page from a
text file.

All i can find it PHP tuorials that include MySql and I dont need that
just yet. I am in urgent need of sorting this quickly and more
learning can come later.

I do have a script http://www.8thrallycross.co.uk/bnb/bnbform.html

that takes all the info for booking in and places it in a text file
(simulated) at http://www.8thrallycross.co.uk/onlinebooking2.shtml

and what I need to do is get the required info across to a web page
similar to this.

http://www.8thrallycross.co.uk/onlinebooking.shtml


<html>
<body>
<p align="right">
<?=readfile('somecontent.txt');?>
</p>
</body>
Jul 17 '05 #2

"CJ Llewellyn" <in*****@example.con> wrote in message
news:cs**********@slavica.ukpost.com...
"Andy T" <an**@westmidland-internet.co.uk> wrote in message
news:7l********************************@4ax.com...
hi

I am after a basic tutorial that uses PHP to create a web page from a
text file.

All i can find it PHP tuorials that include MySql and I dont need that
just yet. I am in urgent need of sorting this quickly and more
learning can come later.

I do have a script http://www.8thrallycross.co.uk/bnb/bnbform.html

that takes all the info for booking in and places it in a text file
(simulated) at http://www.8thrallycross.co.uk/onlinebooking2.shtml

and what I need to do is get the required info across to a web page
similar to this.

http://www.8thrallycross.co.uk/onlinebooking.shtml


<html>
<body>
<p align="right">
<?=readfile('somecontent.txt');?>
</p>
</body>


The line that contains "<?=" may not work, depending on your PHP
configuration (whether or not you have short tags enabled, and I believe
they are disabled by default). If this is the case, replace it with:

<?php echo readfile('somecontent.txt'); ?>

But I'm not sure that the OP was really looking for that. Just printing the
text file verbatim isn't going to look very pretty.

Your method of storage is rather ugly, and sorting that out would be even
uglier. There is a reason most people use MySQL: it is easy and effective
for things like this. It would be worth your time to read at least one of
those MySQL tutorials that you mention. In my opinion, it will take longer
to learn how to solve the current problem you have (how to parse a file that
has been stored with no meaningful format) than it will to install MySQL,
learn the 4 or 5 functions you need, and use them instead.

-Noah
Jul 17 '05 #3
"Richards Noah \(IFR LIT MET\)" <No***********@infineon.com> wrote:

<?php echo readfile('somecontent.txt'); ?>


This will also print the filesize of the file, lose the echo :)
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rich | last post by:
I am going through one of the tutorials on the Python site, and some of the things mentioned are Tci and Basic. What prompt do I do this commands from? I think I am missing something. I am...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
9
by: Tom | last post by:
Hey all, I've been planning to get myself started with DocBook for quite some time now, so when I unexpectedly encountered a task for which DocBook might actually be very useful, I thought I'd...
5
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that...
7
by: Brian Keogh | last post by:
Hi, I'm a student learning TCP/IP networking at University. Although I understand all about TCP/IP Networking in Java I am expected to understand the basics of C with regard to these programs as...
4
by: Christian Blackburn | last post by:
Hi Gang, I saw this for sale online: Microsoft Visual Basic.NET Deluxe Learning Edition Version 2003. I'm wondering is the CD that's bundled with the learning edition just a digitized version of...
4
by: Hoop | last post by:
Hi, I have been working in getting Boost.Python running on my PC, seems to work now. I have what I believe is somewhat of basic question here. I am starting on an application that will...
2
by: hkarthik | last post by:
Hi all, Can anybody help me getting a visual basic complete tutorial for free download or in a pdf format.
0
by: davi | last post by:
http://computer-programmings.blogspot.com/2007/07/visual-basic-tutorial.html
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.