From owner-freebsd-questions@FreeBSD.ORG Thu Feb 23 06:08:06 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D0A316A420 for ; Thu, 23 Feb 2006 06:08:06 +0000 (GMT) (envelope-from ldrada@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD40443D45 for ; Thu, 23 Feb 2006 06:08:05 +0000 (GMT) (envelope-from ldrada@gmail.com) Received: by nproxy.gmail.com with SMTP id o25so1147957nfa for ; Wed, 22 Feb 2006 22:08:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KeR8FodUosofAX6mLwtm4yssifvuS65+S2rgh3fA53z/vV705MTgh4LsMlmRrBHpyo0gJrj5iuDlJlm2bh8dqFqw21HZP9g51zi/sHHsLrRWpldyAhwB1hIUl67eau7LWZ+D12G8O6WC5XL39GoQMNua8L5bkNEUGTOZC9O5pAY= Received: by 10.49.80.13 with SMTP id h13mr2226281nfl; Wed, 22 Feb 2006 22:08:04 -0800 (PST) Received: by 10.48.108.10 with HTTP; Wed, 22 Feb 2006 22:08:04 -0800 (PST) Message-ID: <5ceb5d550602222208m44417ba7n3f7f718856521d85@mail.gmail.com> Date: Thu, 23 Feb 2006 07:08:04 +0100 From: "Daniel A." To: fbsd_user@a1poweruser.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-questions@freebsd.org Subject: Re: Looking for a mentor on php/mysql X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2006 06:08:06 -0000 Hi, While the idea of a "mentor" is quite widespread amongst people who wish to learn a new field within IT, I find it that not many people who want one get one. I can, though, suggest that you in no circumstance save user passwords in plaintext. I could find that file on a live server and retrieve all user passwords. The best way to learn any programming language (Or anything else, for that matter) is to just play with it. Find some good guestbook script, or some other type of not-so-complex code, and hack at it. Add features, edit current features to your liking, etc.. That is how I got good at coding PHP. On 2/22/06, fbsd_user wrote: > I am trying to teach my self php/mysql/html programming. > I have done native static html web sites before. > Running FreeBSD 6.0 with apache13, php, and mysql all installed and > working. > > Have read a few php books and searched the web for code snippets. > Have been on some of the php forum sites, but responses are not forth > coming. > > Looking for a mentor to guide me with puting all the pieces together. > I have a working panel for registering a user that writes to a flat > text file. > Need guidance in changing this to use mysql. Would email you direct > outside of the questions list. > > > > > > > > learning PHP > > >

 

>

 Membership > Registration

>

 

>

Enter your info below.

>

 

> >
"> >
>

Account ID          >    >

>

Account Password   >

>

First > Name            >    >

>

Last > Name            >    >

>

Address > Line          >

> >

City          &nb > sp;           & > nbsp;  >

> >

State          &n > bsp;            >

> >

Zip          &nbs > p;       >         >

>

 

> >

           & > nbsp;          > value=3D"Reset" name=3D"B2">

>
> >

 

> $file_directory =3D $_SERVER["DOCUMENT_ROOT"]; > $user_ip =3D $_SERVER["REMOTE_ADDR"]; > $error =3D 'Could not open the file! Verify permissions & path are > correct.'; > > > if($_POST['action'] =3D=3D "add") > { > if($filehandle =3D fopen("$file_directory/members.php", "a")) > { > flock($filehandle, 2); // lock file > fputs($filehandle, > $_POST['id'].":".$_POST['pw'].":".$_SERVER['REMOTE_ADDR'].":".$_POST[' > first-name'].":".$_POST['last-name'].":".$_POST['address'].":".$_POST[ > 'city'].":".$_POST['state'].":".$_POST['zip']."\n"); > flock($filehandle, 3); // unlock file > fclose($filehandle); > print("Successfully added ".$_POST['id']." to the file"); > } > else > { > echo($error); > } > } > php?> > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >