[PHP-DB] RE: new php developer

2002-02-07 Thread Mikusch, Rita


> I am a student a the University of Pittsburgh, and a new php developer.
Is
> it possible to have a mysql database that is made up of html documents
that
> can be accessed using php?  This question may sound strange, but I'm not
> sure of any other way to say it.

Yes! That's how I have my website set up and it works great! You can set up
a form to input the html into the database -- use a form textbox for the
html. I use a couple different versions . . . one that you can use to input
straight text with embedded html into the database. Another that non html
programmers can use to input content into the database. I just convert their
line-breaks into  tags. It's basic but it works.

Rita.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] RE: Storing Code in a db?

2001-06-29 Thread Mikusch, Rita

Yes! I'd be interested in this as well!

It would be very convenient to be able to store PHP (or any other server
side code) in a database, then retrieve and execute it.

I store a lot of website content with embedded HTML commands in a database.
Being able to store PHP code in the database as well would be very
convenient.

The only way I can think of doing it would involve a lot of very messy
parsing out of the php commands. I expect that would take way to much
processing time. I don't imagine that would work for entire functions
either. Maybe just individual PHP commands.

Any ideas

Thanks! Rita

-Original Message-
From: Mark @ 10base-t [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 6:06 AM
To: [EMAIL PROTECTED]
Subject: Storing Code in a db?


Hey there,
Is it possible to store code like a function, for example, in a mysql
database and pull it into a php dynamicallly so you can use the function if
needed?

Mark 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: Row order

2001-07-11 Thread Mikusch, Rita

Good Morning,

You could create a form and save your variables as "hidden" elements of your
form. I've never tried it without having an actual visible form on the page
with a submit button and everything, but it should work.

The only other ways I can think of are pretty long winded...cookies,
database entries, file entries...

Good Luck,

Rita.

-Original Message-
From: Stefan Doverud [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 4:10 AM
To: [EMAIL PROTECTED]
Subject: Row order


Hello!

I have this little problem sorting a search result by different fieldnames.

I do my search, get a quite impressive amount of variables that I use in my 
MySQL-query, and by default use "ORDER BY name".

But I want to be able to klick on different headers to sort like "ORDER BY 
$order".

The problem that I encounter is that I lose all the variables from the 
search when I refresh the document. Is it possible to resend all variables 
without inserting them in the -tag ?
(like )

Hopefully someone has a smart solution.. =)

regards

  - Stefan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: Best foot forward?

2001-07-20 Thread Mikusch, Rita

Hi,

I created a searchable "members directory" that probably dealt with some of
the issues you're dealing with ... though from your email I can't really
tell what exactly your application is for.

I'm not sure how professional or maintainable mine is, but here are some
basics of how I laid it out...

a) html form using post that is used to get the user's search parameters.
The user hits the submit button to submit their search parameters. The html
form uses post to call itself (ie the PHP page the form is on). 

You could use "GET", but all the values entered by the user would display as
part of the URL. The main issue might be that there is a limit to how long
your URL could be. If the user adds too many search parameters the URL might
become to long and you'd have a problem.

b) First the php script checks to see if search parameters have been
submitted. If yes, then an SQL statement is used to search a MySQL database.
For example, if the user wants to find all members with the last name "lee",
then the SQL statement looks for all members with the last name "lee" and
returns them sorted by one of the columns (in my case the column containing
the full name "last, first")

c) I create a two dimensional array of members that contains just their
member number. I want to display the members returned in pages of 10
entries, so the first dimension of the array contains the page number, and
the second dimension contains the item number on that page...here's the
code, I hope it makes sense...

 // create array of members numbers returned by search
 // note: first dimension is page number
 //   second dimension is page entry (up to 10 items per page)
 $pageNum = 1;
 $itemNum = 1;
 $totalNum = 0;
 while ($fieldsdirectory = mysql_fetch_array($resultdirectory))
 {
$directoryresults[$pageNum][$itemNum] =
$fieldsdirectory["dir_addresses_memberid"];
$itemNum++;
$totalNum++;
if (($itemNum-1) == 10) 
{ 
   $pageNum++;
   $itemNum = 1;
}

 }
 // if the number of items is divisible by 10 we will have an extra
page
 if (($totalNum % 10) == 0) 
 { 
$pageNum--;
 }

If you are displaying items one at a time, just create a one-dimensional
array -- much easier than the mess above!

d) When I display the results, I display the search form so the user can put
in another search, and below it the results. For mine, I don't use
first/last/prev/next, I just display links to the various pages in the
result set and add the variables needed to display those pages to the URL in
the html link (which calls itself). 

In your case, you would probably have a variable that keeps track of the
current entry. Knowing the current entry, you would be easily be able to get
the previous item and the next item (since it is an array). The first item
would be at index=0, and for the last item you could keep track of the total
number of items (or use a function to get the total number of items the
array).

If you think it might be useful, I can send you more of the code. I don't
however separate the PHP from the HTML which makes it a bit confusing and
I'm not sure how close this is to what you're looking for. This is pretty
much a one-person shop and keeping all the code together is probably less
confusing!

Rita.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 5:50 AM
To: [EMAIL PROTECTED]
Subject: Best foot forward?


Hi folks,

I have a requirement to show records in a certain standard 
format from a database. This requires first/previous/
next/last buttons, sorting on the column name, searching
and filtering using text entered into a text box etc etc.
This page would be continuously calling itself when
asked to sort or filter etc. and I wanted to use it as 
a generic display and search/sort page by passing in
an sql command or something along those lines.

This is getting too messy, i.e. using post and get, trying
to work with multiple subnmit buttons (anyone have any
example code here?), having multiple variables passed 
between pages or back into the same page. Can anyone 
tell me the best way to structure this? Should I always 
be using either post or get only, what's the best way to 
pass variables in this manner to ensure ease of maintenance 
and not letting it get messy (for example, should I be using 
an array of variables)? Is there an easier way?

If anyone of you has come across this before, could you 
please point a newbie in the right direction? Thanks.

Best Regards,

Colum Hickey


Mail2Web - Check your email from the web at
http://www.mail2web.com/ .


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To 

RE: [PHP-DB] cancel <20010723135436.90722.qmail@pb1.pair.com>

2001-07-23 Thread Mikusch, Rita

Those emails he's sending might be caused by a virus. I've received about 30
weird emails over the last couple days all from the same person. So have a
few other people in our office. Fortunately our server's been deleting the
virus attachments. 

It was the "W32/SirCam@MM" virus. I don't know anything about it. If you
suddenly find yourself sending lots and lots of weird emails . . . you might
want to check that out at symantec or mcafee :)

Rita.

-Original Message-
From: Tom Hodder [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 10:13 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] cancel <[EMAIL PROTECTED]>


What was all that about~??

-Original Message-
From: Christian St-Pierre [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 16:02
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP-DB] cancel <[EMAIL PROTECTED]>


This message was cancelled from within Mozilla.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: Tree Display

2001-07-30 Thread Mikusch, Rita

Have your table set up with the following two fields (among others!):

-Category
-Parent

"Result1" parent = 0 (it has no parent). "Item1" parent is "Result1" (ie the
"parent" field of item1 is "result1"'s unique identifier). "Item2" parent is
"Result1". "Result2" parent = 0. "Result2"'s "children" have "Result2" as
their parent.

Now you have to write the PHP code so that the corrent items are display. If
no "results" are clicked then display all "results" in a column. 

"Result1"'s URL would be something like "samepage.php3?result=result1". Have
PHP code that checks if you have a value for "Result" then displays that
result's "items" . . . and if you have a value for "result1" and "item1"
then display the items for "result1" and the content for "item1". 

I use a tree display for website menus and submenus. And I've created an
entire administrative interface that makes it really easy to move sections
of the trees around. It makes it really easy when people come to me at the
last minute and want me to rearrange some part of the main menu, or add a
whole section.

You should be able to use this from other tree structures like "product
lists", etc etc.

Hope this makes sense . . . 

Rita.

-Original Message-
From: Sharif Islam [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 2:13 PM
To: [EMAIL PROTECTED]
Subject: Tree Display



I am still trying to figure out how to do it. I want to display my result
from the data base in tree/menu like system.

So the result page will look like this:


  +Result1 (you click this , it will expand)
  -Item1 (you click this and get more info)
  -Item2
  -Item3

  +Result2
  -Item1
  -Item2


All the records will be pulled from the same table.

Any hint?




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: what's a GOOD starting HOURLY rate for a PHP/MYSQL job?

2001-11-09 Thread Mikusch, Rita

Something that might be useful would be a sort of "guide" or list of tips
and tricks to creating a quotation for a programming job. I wouldn't know
where to find something like that though. Maybe the business section of a
larger bookstore?

rita.

-Original Message-
From: Steve Brett [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 1:55 AM
To: [EMAIL PROTECTED]
Subject: Re: what's a GOOD starting HOURLY rate for a PHP/MYSQL job?


I'd also be interested in what people are charging as I'm thinking of
setting up as a contractor myself and it would be nice to have a 'ball park'
figure of what the going rate is ...

Pls mail replies to [EMAIL PROTECTED]

Ta,

Steve

"Leo G. Divinagracia III" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> okay, you consultants...
>
> i'm gonna venture at work to do some side jobs here for some online
> dynamic web pages.  but what would be a good starting pay rate?
>
> or would you contract for the entire job?  what about a per PAGE/SCRIPT
> basis?
>
> thanks...
>
> --
> Leo G. Divinagracia III
> [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] HTTP authentication

2002-01-22 Thread Mikusch, Rita

I had the same problem . . . couldn't get HTTP authentication to work. It
turn out that I had to email my ISP and ask their sysadmin to set the HTTP
authentication to work individually for each directory I needed it for. I
can't remember the apache details -- they needed to add a line to some admin
file.

Unfortunately the sysadmin was a little absent minded and FORGOT that she
was supposed to add this line to some admin file to get the HTTP
authentication to work. I spend a LOT of phone calls and emails trying to
explain to her that I was doing my part correctly and there was something
wrong on her end. 

Anyway, I guess what I'm trying to say is double check your apache set up,
perhaps there's an admin file you need to edit! Sorry I can't tell you which
one, as I know very little about Apache. Of course if I keep having to tutor
my sys-admin over the phone, I'll eventually be an expert!

Rita.

-Original Message-
From: news.php.net [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 20, 2002 6:17 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] HTTP authentication


Dear Beau,

Thanks for your answer, and indeed.. it doesn't have too much to do with
databases, although if an example of authentication using a database would
be great.

And I was a bit vague on which webserver (indeed Apache). And I do have
command line access. However in my initial message I said that directory
authentication (with .htaccess) doesn't work. And I've tried more than once
to get it to work.

So if you could still help me, or anyone else I would greatly appreciate it!

Yours,

Kevin
"Beau Lebens" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> not that this has anything to do with databases... ([php-db])
>
> assuming;
> 1. you are using apache
> 2. you have command-line access to your server
> 3. your webhost has htaccess enabled and configured to use ".htaccess" as
> the security file
>
> you should be able to drop a file called (usally) ".htaccess" into the
> directory you want to secure. you then go to the command line and do
> something like
>
> $ htpasswd -c "/home/you/htbin/.htpasswd" username
>
> which creates (-c) the password file (/home/you/htbin/.htpasswd) and adds
a
> user called "username" to it. when you hit enter it will ask for a
password
> (twice).
>
> now the .htaccess file which is in your "to-be-secured" directory needs to
> look something like this;
>
>  snip
> AuthUserFile /path/to/htpasswd/file
> AuthName "Name to Appear in Box"
> AuthType Basic
>
> 
> require valid-user
> 
>  snip
>
> that example looks in "/path/to/htpasswd/file" and confirms that the
> user/pass combintation is a "valid-user" (any valid combo from the file)
and
> if so, allows them access.
>
> you can get more information on all of this in the apache docuemntation at
> apache.org, search for "htaccess" and you might also be interested in the
> groups ability of the system, so search for "htgroup" (i think)
>
> hth
>
> beau
>
>
> // -Original Message-
> // From: news.php.net [mailto:[EMAIL PROTECTED]]
> // Sent: Monday, 21 January 2002 3:36 AM
> // To: [EMAIL PROTECTED]
> // Subject: [PHP-DB] HTTP authentication
> //
> //
> // Heya,
> //
> // I'm trying to find out how http header authentication works.
> // For some reason
> // my webserver won't do it on a directory basis. But the
> // problem is that the
> // documentation that came along with the PHP package doesn't
> // help me much.
> //
> // Can you guys give me a working example on how to use and
> // implement it?
> //
> // I would really appreciate it,
> //
> // Kevin
> //
> //
> //
> // --
> // PHP Database Mailing List (http://www.php.net/)
> // To unsubscribe, e-mail: [EMAIL PROTECTED]
> // For additional commands, e-mail: [EMAIL PROTECTED]
> // To contact the list administrators, e-mail:
> // [EMAIL PROTECTED]
> //



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]