Page 1 of 1
client to add text to page
Posted: Wed Jan 13, 2010 7:21 am
by eric_e
I am new to learning php but have been building basic sites for years now
I'm interested to understand php because it looks some what easy to understand and some of the capabilities I seen what and can do
my ideal is to have the client to login in and post information in a pacific area on the home page about rain delays or other important information, is this possible I have not seen anything out there or what it would be called in a search.
the hosting I use allows for php and mysql so this is the direction I was thinking
thanks for any support
Re: client to add text to page
Posted: Wed Jan 13, 2010 7:32 am
by aravona
You can use a html form with a large text area, save the text using php into your mysql database and then draw that information back out to display onto your homepage. Is this the kinda thing that you mean?
Re: client to add text to page
Posted: Wed Jan 13, 2010 8:58 am
by eric_e
aravona
sounds like what I want
I just need to learn how to do that now
this is for a kids softball league
the other thing I wanted to do is have the parents go to the site and be able to select there team and see only the dates they are playing if selected if not you see the hole thing
I am so new to php I am trying to understand the benefits to it and just not seeing many live examples
eric
Re: client to add text to page
Posted: Wed Jan 13, 2010 9:20 am
by aravona
Ok well you're not asking the world even if it feels like it.
What you're actually going to need for the second part is something like an option list which isnt hard to do in HTML, and have what you want in that option. You'll need a table in your database with for example, the teams you have and all their information - dates, locations, wins, loses etc etc.
You can select this information using the option list - based on the factor you want, like date or team (team maybe easiest).
Code: Select all
<form action="A_Page.php" method="post">
Select Option:
<select name="selqty">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<br/><br/>
<input type="submit" value="Submit"/>
</form>
You can then use this information in the A_Page.php (or whatever you call it), with some php, to draw what you need to from your database. Is that the kinda thing you wanted?
To show every detail of this table on the site you can use a simple select statement:
Select * from
table name
This will show a string of data on your page, from whatever you call your table, and you can then use a combination of html and php to put it into a table.
(sorry I'm not going super in depth, working at the same time

)