[PHP] Cry for help
I need to learn PHP and databases. If I had those skills, I would be so much more succesful with my web designs. What I usually do, is make the html templates, and then hire someone, usually expensively, to do the PHP and MySQL bankend. Unfortunately, my programming skill is ZERO. Ok, maybe not zero, I do have a little bit of PERL experience, but it mainly comes in the form of downloading prewritten scripts, and lots of trial and error in editing them using common sense and drawing on my experience of BASIC which I learned when I was 6 years old! I have browsed hours on the net looking for help in this sort of thing. I have downloaded programs, I have read hours of documents and "manuals", and still, I am no further along than where I started. Programming and databases are more of a mystery to me than women are. I'm absolutely CLUELESS. So basically, I need to learn this stuff as soon as humanly possible, but I have NO IDEA where to start. Let me tell you first what I have done thusfar. First thing I did was download something called mySQL Max version 3.23.49 directly from the website of mysql. I was under the impression that this program would be something along the lines of MS Access in the standpoint of user interface, and it would allow you to create tables etc. (I do know how to create some rudimentary tables in MS Access). So after I installed this program, I clicked on the icon to start it, and to my surprise, the only thing that happened was the an MS-Dos box popped up for about 2/10ths of a second and then disappeared. So to me it was a waste of 2 hours of downloading. After a bit more of prodding I saw that there was some configuring to do. For the life of me, I have no idea where to look, and even if I did, I wouldnt have any idea what I need to configure anyways. Basically I want to have this installed so that during my learning process of PHP, I can test and run things on my local machine, and not have to connect to the internet, upload files etc. Secondly, I downloaded something similar, called Easy PHP. The website said it would install this and that and then something else that would allow you to run PHP scripts on your local machine as well as being an editor to help you write scripts. So I downloaded this as well. So 27 MB and 3 hours later I have yet another useless program with no interfaces nothing. Just something that runs in the background. So now I talked with my roommate and explained these issues to him. He pointed me to a software called CodeCharge. So I downloaded that and spent hours looking through the "templates" and what not, and although I can see this is a step in the right direction, it still leaves me with more questions than answers. It wants me to specify DNS or ODBC or ASPI etc etc and I have no clue what that is, what it means or what is does. Furthermore I see no way to use existing html files that I have created as templates. Just existing ugly templates that come with the software. I'm sure there is a way to do that, but I haven't figured it out. So what are my questions? Basically want to do is create sets of HTML templates for various sections of sites. Then using the templates, code the PHP to pull the correct information from a database, manipulate it, and then return it together with templates. For example. On this a site that I am now working on, there is a section that will contain headlines to various news stories. In the HTML it looks something like this: HEADLINE DATE All this would simply create is something that looks like this Below: Headline September 12, 2002 Obviously clicking the headline would take you to another page that would give you the entire story. To me, drawing on common sense, what you are really saying is this: {LOOK IN THE DATABASE FOR A HEADLINE AND PRINT IT HERE} {LOOK IN THE DATABASE FOR THE DATE OF THE ABOVE HEADLINE AND PRINT IT HERE} Makes sense no? So really for this template, it would use 2 sections from the database: "Headline" and "Date" and the PHP tells the server where to put what depending on which templates is being used I don't want to drag this on, but in other words for these sites that I am creating there are basically 1 thing that I need to accomplish. #1 is that I need a "control panel" that is somewhere that I can go to any computer and log in to. When I do that I can log-in and that will bring me to and ADD/EDIT/DELETE form for any section of the site, and if I go to add, then I will type the various bits of info into it, click submit and automatically that info is added to the database. The edit and delete features are self explanatory, but the end result is simply saying that OK, now I've entered the info into the database, Now, Mr. Server and Mr. PHP when the time comes for this info to be used, you have the info. To me this isn't brain science in concept, but I have no friggin idea where to start. So? Where do I start? Ok, so hopefully you've read with me so far. And I do appreciate it
[PHP] Re: Cry for help
Justin, Thanks for the reply. Funny seeing the word "dude" again. Havent heard that in quite a while, since moving over here to Italy. :) I hope I didnt come across as thinking I can just learn this in a week or two. I'm bright, but I'm not a genius. I know, and realize that it is a long a frustrating process. What I don't have is the real opportunity here to learn this like I could back in the states. There isn't a lot of info here on the topic in English, no classes to take, etc. I can't just walk into the local bookstore and buy a PHP book. While I am fluent in Italian, it would be that much easier if I can get my start in English obviously. As far as Apache is concerned, I looked at the website, yet couldnt find the exact server software, so if you could provide me with a direct link I'd appreciate it. It would be to my benefit however, if I could not only serve myself html pages as http:// but also as file:// as internet costs here are ridiculously high (no unilimited $24.99 2/7 packages here yet) I have read many docs and downloaded many scripts to try to familiarize myself with the language, and while I grasp many of the concepts, I still have lingering questions that I havent been able to resolve. So I have been trying to just have some of my fellow netizens to just point me to the right door in the HUGE hallway of doors that will get me into the proper room in which to learn. So thanks again -Tree Chad Winger <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I need to learn PHP and databases. If I had those skills, I would be so much > more succesful with my web designs. What I usually do, is make the html > templates, and then hire someone, usually expensively, to do the PHP and > MySQL bankend. > > Unfortunately, my programming skill is ZERO. Ok, maybe not zero, I do have a > little bit of PERL experience, but it mainly comes in the form of > downloading prewritten scripts, and lots of trial and error in editing them > using common sense and drawing on my experience of BASIC which I learned > when I was 6 years old! > > I have browsed hours on the net looking for help in this sort of thing. I > have downloaded programs, I have read hours of documents and "manuals", and > still, I am no further along than where I started. Programming and databases > are more of a mystery to me than women are. I'm absolutely CLUELESS. > > So basically, I need to learn this stuff as soon as humanly possible, but I > have NO IDEA where to start. Let me tell you first what I have done thusfar. > > First thing I did was download something called mySQL Max version 3.23.49 > directly from the website of mysql. I was under the impression that this > program would be something along the lines of MS Access in the standpoint of > user interface, and it would allow you to create tables etc. (I do know how > to create some rudimentary tables in MS Access). So after I installed this > program, I clicked on the icon to start it, and to my surprise, the only > thing that happened was the an MS-Dos box popped up for about 2/10ths of a > second and then disappeared. So to me it was a waste of 2 hours of > downloading. > > After a bit more of prodding I saw that there was some configuring to do. > For the life of me, I have no idea where to look, and even if I did, I > wouldnt have any idea what I need to configure anyways. Basically I want to > have this installed so that during my learning process of PHP, I can test > and run things on my local machine, and not have to connect to the internet, > upload files etc. > > > Secondly, I downloaded something similar, called Easy PHP. The website said > it would install this and that and then something else that would allow you > to run PHP scripts on your local machine as well as being an editor to help > you write scripts. So I downloaded this as well. So 27 MB and 3 hours later > I have yet another useless program with no interfaces nothing. Just > something that runs in the background. > > So now I talked with my roommate and explained these issues to him. He > pointed me to a software called CodeCharge. So I downloaded that and spent > hours looking through the "templates" and what not, and although I can see > this is a step in the right direction, it still leaves me with more > questions than answers. It wants me to specify DNS or ODBC or ASPI etc etc > and I have no clue what that is, what it means or what is does. > > Furthermore I see no way to use existing html files that I have created as > templates. Just existing ugly templates that come with the software. I'm > sure there is a way to do that, but I haven't figured it out. > > So what are my questions? Basically want to do i
Re: [PHP] Re: Cry for help
Thanks for the reply :P I found it actually. Now I have the apache and php running, and am able to run my aforementioned test script locally. I am still looking through the manual now for the syntaxes and such. I am also looking on the web for some simple prewritten scripts to run and then try to dissect and deconstruct. With my little test "script" I've written, there are a few things I'd like to be able to try to do with it that I think would help my learning process go on more smoothly, but i cant seem to figure out, what functions to even begin to try to use. I'll give an example. This is the result of my little "test" script as printed into a txt file. |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia Viola So if i fill out the form again, and resubmit, i might get something like this: |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia Viola |Serie C2 Round 2|09.09.02|20.45|Gualdo|Florentia Viola So for example, lets say I wanted to make another html form that has a form field for List team by: and and select either "home" or "away" ... by selecting "home", the browser would print out the following: Sangiovannese Gualdo so now I need to figure out how to get PHP to do the following: #1 look at each line in the text file and treat it individually #2 select the data after the 4th | from each line #3 print it back to the browser It's simple things like this that will get me going. I know for guys like you, it would take about 3 minutes to type that up but to me its a little tough trying to figure out how and where to use what. This manual isnt the most well put together in my opinion, its tough to locate things. So if someone or something would say to me"well for that operation, you need to create function_whatever, then run a so_and_so then I could go to the manual, and then learn how to write it. So this is my problem right now, basically not knowing WHAT to learn first. Thoughts? Thanks again -Tree - Original Message - From: Jay Blanchard <[EMAIL PROTECTED]> Newsgroups: php.general To: 'Chad Winger' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 12, 2002 3:01 PM Subject: RE: [PHP] Re: Cry for help > [snip] > As far as Apache is concerned, I looked at the website, yet couldnt find the > exact server software, so if you could provide me with a direct link I'd > appreciate it. It would be to my benefit however, if I could not only serve > myself html pages as http:// but also as file:// as internet costs here are > ridiculously high (no unilimited $24.99 2/7 packages here yet) > [/snip] > > When you install apache locally (on your own system) you will be serving > pages as http:// locally. Should help you to cut down on those unreal > internet costs. > > What OS are you running now? Give us that and we can point you to a link. > > HTH! Peace ... > > Jay > > Jay Blanchard <[EMAIL PROTECTED]> wrote in message 001901c25a5c$797161c0$8102a8c0@000347D72515">news:001901c25a5c$797161c0$8102a8c0@000347D72515... > [snip] > As far as Apache is concerned, I looked at the website, yet couldnt find the > exact server software, so if you could provide me with a direct link I'd > appreciate it. It would be to my benefit however, if I could not only serve > myself html pages as http:// but also as file:// as internet costs here are > ridiculously high (no unilimited $24.99 2/7 packages here yet) > [/snip] > > When you install apache locally (on your own system) you will be serving > pages as http:// locally. Should help you to cut down on those unreal > internet costs. > > What OS are you running now? Give us that and we can point you to a link. > > HTH! Peace ... > > Jay > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Cry for help
I have no idea what that means, sorry :) My point for wanting to do this isnt because I really want to make a list of the home teams or whatnot. But obviously, at some point, I am going to have to learn how to split different bits of information, how organize them in certain ways, in certain orders etc. So if i can figure out how to get PHP to select the certain bits of info, and then organize them, say, alphabetically, that will teach me how to write some syntax, to use a few different functions and to begin how to set variables. in 85 when i had the old Apple IIe I was able to do stuff like this with the if A$=whatever then goto ... type stuff and it was easy back then. Now i realize PHP is not BASIC, nor am I a little kid anymore, but the basic idea of what i'd like to learn to do is there. So if i can just get used to working with it, then it will come -Tree Adam Williams <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You can use PHP and file() to do with, along with the str functions, but > if I were you and you already know what the filename of the file is you > are working on (or can submit it via a form) I would use the unix command > cut to do the operations on the file. Use another exec() or system() and > have it run cut -d | -f 4 yourfile.txt and then return you the output. > > Adam > > On Thu, 12 Sep 2002, Chad Winger wrote: > > > Thanks for the reply :P > > > > I found it actually. Now I have the apache and php running, and am able to > > run my aforementioned test script locally. I am still looking through the > > manual now for the syntaxes and such. I am also looking on the web for some > > simple prewritten scripts to run and then try to dissect and deconstruct. > > > > With my little test "script" I've written, there are a few things I'd like > > to be able to try to do with it that I think would help my learning process > > go on more smoothly, but i cant seem to figure out, what functions to even > > begin to try to use. > > > > I'll give an example. > > > > This is the result of my little "test" script as printed into a txt file. > > > > |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia Viola > > > > So if i fill out the form again, and resubmit, i might get something like > > this: > > > > |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia Viola > > |Serie C2 Round 2|09.09.02|20.45|Gualdo|Florentia Viola > > > > So for example, lets say I wanted to make another html form that has a form > > field for List team by: and and select either "home" or "away" ... by > > selecting "home", the browser would print out the following: > > > > Sangiovannese > > Gualdo > > > > so now I need to figure out how to get PHP to do the following: > > > > #1 look at each line in the text file and treat it individually > > #2 select the data after the 4th | from each line > > #3 print it back to the browser > > > > It's simple things like this that will get me going. I know for guys like > > you, it would take about 3 minutes to type that up but to me its a little > > tough trying to figure out how and where to use what. This manual isnt the > > most well put together in my opinion, its tough to locate things. So if > > someone or something would say to me"well for that operation, you need to > > create function_whatever, then run a so_and_so then I could go to the > > manual, and then learn how to write it. So this is my problem right now, > > basically not knowing WHAT to learn first. > > > > Thoughts? > > > > Thanks again > > > > -Tree > > - Original Message - > > From: Jay Blanchard <[EMAIL PROTECTED]> > > Newsgroups: php.general > > To: 'Chad Winger' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Thursday, September 12, 2002 3:01 PM > > Subject: RE: [PHP] Re: Cry for help > > > > > > > [snip] > > > As far as Apache is concerned, I looked at the website, yet couldnt find > > the > > > exact server software, so if you could provide me with a direct link I'd > > > appreciate it. It would be to my benefit however, if I could not only > > serve > > > myself html pages as http:// but also as file:// as internet costs here > > are > > > ridiculously high (no unilimited $24.99 2/7 packages here yet) > > > [/snip] > > > > > > When you install apache locally (on your own system) you will be serving > > > pages as http:// locally
Re: [PHP] Re: Cry for help
Html is something i do in my sleep :P thankfully I've been good enough with it to make a decent living with it. What you mention is quite logical, as i would find myself correcting the ppl coding the databases and/or scripts by saying, stuff like "you realize that when the info is returned like that you are going to need four colums in the html, not 3..." and they'd be like, geez..your right...and then they'd have to go back and code again... So i am hoping that the html part that i know helps me gets me thru the scripting phase a little easier, although the languages are apples and oranges iom looking thru the tuts now :P cheers -Tree Will Steffen <[EMAIL PROTECTED]> wrote in message 000c01c25a63$e616a0e0$8000a8c0@william">news:000c01c25a63$e616a0e0$8000a8c0@william... > Heh - I know how you feel. > > I'm an ex network tecchie fighting my way through a career change to web > developer - spent some time messing with various scripting tools and so > forth, but never really had any formal coding experience until I hit php > - if you want some advice on learning php mine is spend the next few > weeks/months just soaking up every tutorial you can lay your hands on - > the best libraries are on phpbuilder, devshed and zend imho - altho > webmonkey also has a couple of really 'beginner' ones (hello world > country) you might want to start out with. > > Also one thing no-one ever really tells you about this is that one of > the most important things to learn if you plan on building sites with > php is not php - its html. I know this is a bit duh!, but seriously - > php is about logical structures - and slapping together a few variables > - it aint that hard once you get in the groove, but if you don't know > your html well enough to handcode it and to deconstruct a fat mess of > tags in your head and visualize what its going to end up looking like on > screen - you're going to have a hard time coding scripts to generate the > stuff. > > > 0.02 - actual mileage may vary - insert coin to generate more bs > > Cheers > Will > > > -Original Message- > > From: Chad Winger [mailto:[EMAIL PROTECTED]] > > Sent: 12 September 2002 03:34 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] Re: Cry for help > > > > > > I have no idea what that means, sorry :) > > > > My point for wanting to do this isnt because I really want to > > make a list of the home teams or whatnot. But obviously, at > > some point, I am going to have to learn how to split > > different bits of information, how organize them in certain > > ways, in certain orders etc. So if i can figure out how to > > get PHP to select the certain bits of info, and then organize > > them, say, alphabetically, that will teach me how to write > > some syntax, to use a few different functions and to begin > > how to set variables. > > > > in 85 when i had the old Apple IIe I was able to do stuff > > like this with the if A$=whatever then goto ... type stuff > > and it was easy back then. Now i realize PHP is not BASIC, > > nor am I a little kid anymore, but the basic idea of what i'd > > like to learn to do is there. So if i can just get used to > > working with it, then it will come > > > > -Tree > > > > Adam Williams <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > te.ms.us... > > > You can use PHP and file() to do with, along with the str > > functions, > > > but if I were you and you already know what the filename of > > the file > > > is you are working on (or can submit it via a form) I would use the > > > unix command cut to do the operations on the file. Use > > another exec() > > > or system() and have it run cut -d | -f 4 yourfile.txt and > > then return > > > you the output. > > > > > > Adam > > > > > > On Thu, 12 Sep 2002, Chad Winger wrote: > > > > > > > Thanks for the reply :P > > > > > > > > I found it actually. Now I have the apache and php > > running, and am > > > > able > > to > > > > run my aforementioned test script locally. I am still looking > > > > through > > the > > > > manual now for the syntaxes and such. I am also looking > > on the web > > > > for > > some > > > > simple prewritten scripts to run and then try to dissect and > > deconstruct. > > > > > > > > With my little test "script" I've written, there are a few things > > > > I'd > > like > &
[PHP] Re: alphabetical order?
Hello Rudolf, Thank you for responding to my post, I really appreciate it. I ran the script you sent me, and then I tried looking up the syntax to try to figure out what it means. As it would be pointless for me just to take suggestions that people send me and then not learn what they mean. The resulkt of your code does in fact alphabatize the teams in the select list, however there is a little problem with the end result. your code: '.$alphabetical[$i].''."\n"; } fclose ($fd); ?> returns the follwoing html: Aglianese Brescello Casteldisangro Castelnuovo Fano Florentia Viola Forlì Grosseto Gualdo It is returning the first letter of $squads[1]. so the "id variable is getting lost.That variable is $squads[0]. So in effect that vairable is getting "lost" because when i modify the line echo ''.$alphabetical[$i].''."\n"; to read echo ''.$alphabetical[$i].''."\n"; then the HTML output becomes Aglianese Brescello Casteldisangro Castelnuovo Fano Florentia Viola Forlì Grosseto Gualdo In other words what I am trying to do is something to the effect of $alphabetical = $squads[1][0]. Then I want to sort that only by $squads[1]. When the html is returned, I want to be able to echo the $squads[0] as the Value of the select dropdown. Thanks again, -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help.....still stuck after 3 days :/
Hello Rudolf, Thank you for responding to my post, I really appreciate it. I ran the script you sent me, and then I tried looking up the syntax to try to figure out what it means. As it would be pointless for me just to take suggestions that people send me and then not learn what they mean. The resulkt of your code does in fact alphabatize the teams in the select list, however there is a little problem with the end result. your code: '.$alphabetical[$i].''."\n"; } fclose ($fd); ?> returns the follwoing html: Aglianese Brescello Casteldisangro Castelnuovo Fano Florentia Viola Forlì Grosseto Gualdo It is returning the first letter of $squads[1]. so the "id variable is getting lost.That variable is $squads[0]. So in effect that vairable is getting "lost" because when i modify the line echo ''.$alphabetical[$i].''."\n"; to read echo ''.$alphabetical[$i].''."\n"; then the HTML output becomes Aglianese Brescello Casteldisangro Castelnuovo Fano Florentia Viola Forlì Grosseto Gualdo In other words what I am trying to do is something to the effect of $alphabetical = $squads[1][0]. Then I want to sort that only by $squads[1]. When the html is returned, I want to be able to echo the $squads[0] as the Value of the select dropdown. Thanks again, -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New problem - preg_match?
Yes, I'm STILL a newbie :) I've gotten pretty far in a few days thanks to you all. I have a new question for you, maybe this is a bit easier than my last issue. Still using my text file example, which has lines such as: 0706010102|01.01.02|16:00|Serie C2|02|Forlì|Florentia Viola| 0610010102|01.07.02|16:00|Serie C2|05|Florentia Viola|Gubbio| 1806190702|19.07.02|16:00|Serie C2|05|Savona|Florentia Viola| I am able to with a form, create a new addition to the file. What I'd like to do now however, is before writing to the file, check the second field (the date in this case) and if it is the same as what is being submitted, then I want to buy using an if...else statement stop it from being written. What I tried was to create an array called $getdate by exploding the file that has the text above. Then, I also created a variable called $datetest which was from the form such as: $datetest = ("$day.$month.$year"); so Now i wanted to compare $getdate[1] to $datetest and if any of the exploded arrays from $getdate[1] matched up with $getdate, i.e. what is being submitted from the form, then it would not go to write the file. I tried it like so: $fd = fopen ($schedule, "r"); while (!feof ($fd)) { $currentlines = fgets($fd, 4096); $getdate = explode("|", $currentlines); $datetest = ("$day.$month.$year"); if (preg_match ($getdate[1] , $datetest)) { echo 'date already listed'; } else { $fp = fopen($schedule, "w"); fwrite($fp, "$current\n$homename[0]$awayname[0]$day$month$year|$day.$month.$year|$matcht ime|$competition|$round|$homename[1]|$awayname[1]|"); fclose($fp); echo 'success'; } I am not even sure if this is the function i need to use, but if it is, my syntaxt must be wrong, because I have tried all combinaions and I keep getting errors. Any suggestions? Thanks as always -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Commenting out characters?
Simple question for the newbie...I hope... The following line is returning an error, and I can't figure out what and how to comment out. I assumed I had to \ the parentheses...but it doesnt work... any suggestion? echo ''."\n "; Thanks -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Commenting out characters?
I figured it out...was the single quotes Disregard Chad Winger <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Simple question for the newbie...I hope... > > The following line is returning an error, and I can't figure out what and > how to comment out. I assumed I had to \ the parentheses...but it doesnt > work... any suggestion? > > echo ' onClick="MM_showHideLayers('Layer5','','show','Layer4','','hide')">'."\n > "; > > > Thanks > -Tree > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php