Advice for a new learner

liunx

Guest
I have created a couple of simple websites in Dreamweaver but need to move onto the next step, which is to create a website for a friend who needs to update the content himself from a browser. (One page shows availability dates for a rental property, and he needs to be able to edit the dates himself at will). <br />
<br />
I dimly comprehend that I will need to set up some sort of password access to an SQL database on the web server, but have no idea how to do this or what I need to learn. The current site has the availability data hard-coded in html, so I guess the first step would be to store this data outside the html document and access it when the page is served.<br />
<br />
I'd welcome any comments on the simplest method to achieve this - remember I'm technically dumb!<br />
<br />
And can anyone point me towards a book, pdf or website that will teach me what I need to know?<br />
<br />
Cheers<br />
<br />
Ferret119<!--content-->You will need a server side language and a database what does your host support. It can be achieved in anything php, asp, asp.net etc etc.<!--content-->Yes, sharkey is right. It's difficult to give you more advice without knowing what language you will be using. I prefer php as a general rule, but I used to be a C programmer, so it felt familiar. Depending on how you plan to step up your knowledge will affect a recommendation. <br />
<br />
Usually, for a beginner that is afraid to muddle through code I recommend Coldfusion. It encapsulates much of the 'fun' stuff in simple to use tags. The biggest downside is that it often encourages poor style and bad technique. It does get the job done quickly, though.<br />
<br />
Let us know a little bit more and maybe we can steer you in the right direction.<!--content-->Originally posted by ferret119 <br />
I have created a couple of simple websites in Dreamweaver but need to move onto the next step, which is to create a website for a friend who needs to update the content himself from a browser. (One page shows availability dates for a rental property, and he needs to be able to edit the dates himself at will). <br />
<br />
I dimly comprehend that I will need to set up some sort of password access to an SQL database on the web server, but have no idea how to do this or what I need to learn. The current site has the availability data hard-coded in html, so I guess the first step would be to store this data outside the html document and access it when the page is served.<br />
<br />
I'd welcome any comments on the simplest method to achieve this - remember I'm technically dumb!<br />
<br />
And can anyone point me towards a book, pdf or website that will teach me what I need to know?<br />
<br />
Cheers<br />
<br />
Ferret119 <br />
<br />
If you want you can add me to MSN and I can explain to you how to create something like. But conceptually, I'll explain it here.<br />
<br />
//Begin <br />
Firstly, you need to learn how to do all the little things in PHP, such functions as, include_once, echo and then you need to learn the syntax of querying the db.<br />
<br />
[1] Setup the database<br />
<br />
#<br />
# Table structure for table `rental_table`<br />
#<br />
<br />
CREATE TABLE `rental_table` (<br />
`id` int(10) NOT NULL auto_increment,<br />
`avail_date` timestamp(14) NOT NULL,<br />
`description` longtext NOT NULL,<br />
PRIMARY KEY (`id`)<br />
) TYPE=MyISAM AUTO_INCREMENT=5 ;<br />
<br />
#<br />
# Dumping data for table `rental_table`<br />
#<br />
<br />
INSERT INTO `rental_table` VALUES (1, 20040711054733, 'text text text text text text text text text text ');<br />
INSERT INTO `rental_table` VALUES (2, 20040711054747, 'text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 ');<br />
INSERT INTO `rental_table` VALUES (3, 20040711055144, 'adfasdffdasdf');<br />
INSERT INTO `rental_table` VALUES (4, 20040711055153, 'asfdsddf moooooo mooo a afasdf');<br />
<br />
<br />
<br />
[2] Setup your queries & Echo out all your rows using a while loop<br />
<br />
<?php<br />
mysql_connect(localhost, asdfmoo, asdfpass);<br />
mysql_select_db (rental) or die ("Database not responding.");<br />
$query = "SELECT id, DATE_FORMAT(avail_date, '%b/%e/%y [ %l:%i %p ]') as date, description FROM rental_table ORDER BY avail_date DESC";<br />
$result = mysql_query($query) or die ("Query failed.");<br />
echo "<table width='600' border='2'>\n";<br />
echo "<tr><td align='center'><b>Available Date</b></td><td align='center'><b>Description</b></td></tr>";<br />
while ($row = mysql_fetch_assoc ($result)) {<br />
//define the content variables now<br />
$avail = $row['date'];<br />
$description = nl2br ($row['description']);<br />
echo "<TR><TD width='200'>$avail</TD><td width='400'>$description</td></tr>\n";<br />
}<br />
echo "</TABLE>\n";<br />
<br />
?><br />
<br />
<br />
[3] Create your functions [add/delete/update]<br />
I'll leave this to you. If you can add me to msn (first message me through this forum and I'll give you my msn addy) and I'll show you how to set up add/delete/update forms.<br />
<br />
Hope this helps :)<br />
<br />
Edit: Sorry folks, it's not xhtml 1.1 compliant, it's a quick mockup hahah :)<br />
<br />
<!-- m --><a class="postlink" href="http://bueza.com/helper02.gif">http://bueza.com/helper02.gif</a><!-- m --> <br />
<br />
^^ what it looks like. Lots of more things you can add!<!--content-->Blimey - what a helpful community this is. I post a question and a few hours later I've not only got some useful pointers but someone has written me some code tailored to my requirement! Thanks.<br />
<br />
Do I face a choice between learning to use Coldfusion and learning PHP, or does Coldfusion support PHP? (You start to see the size of my "learning opportunity")<br />
<br />
I'm tempted to Download <!--more--> a trial copy of Coldfusion so I can take advantage of its help and tutorials to get me started. I don't think I'm aiming for anything complex or powerful, so I can live with a few bad habits if it gets me over this hurdle.<br />
<br />
Yours<br />
<br />
ferret119<!--content-->I think at the end of the day you will have to learn one of them i would recommend using asp.net,php or asp rather than going the coldfusion route.<!--content-->Originally posted by ferret119 <br />
<br />
Do I face a choice between learning to use Coldfusion and learning PHP, or does Coldfusion support PHP? <br />
Your choices are not just limited to PHP and Cold Fusion — there are many other server-side languages, including ASP, ASP.net and JSP. I, personally, would recommend PHP. ;)<br />
<br />
One of the biggest factors in what language you chose is what language your host supports.<!--content-->Paul Jr is right - probably the biggest factor is what your hosting provider supports. Php, perl, and asp are widely supported. I wouldn't recommend perl for a learner's language, but then again many people started there since it is one of the most venerable languages out. Coldfusion is not as readily supported, but the learning curve is far lower (IMHO) and the concepts learned are as portable as any other language.<br />
<br />
All languages are more or less the same (bells and whistles aside).<br />
<br />
If you have to have an answer one way or the other, go with php. It will serve you well.<!--content-->I've gone down the Coldfusion route and I'm happy with the results: I have managed to build the app that I needed, and it only took a day out of my life to learn as I was already OK with Dreamweaver. This also meant that I did my learning in tutorials and Macromedia forums, rather than bothering you folk with every little problem and block.<br />
<br />
People I work with who are serious techos won't touch Coldfusion, but they are in the business of building apps for hundreds of thousands of concurrent users. Mine has one!!!<br />
<br />
Can I just say thanks for the help. There were too many unknowns and fuzzy areas, and your input was really useful.<br />
<br />
Regards,<br />
<br />
ferret119<!--content-->
 
Back
Top