Re: [PHP] one click - two actions?

2006-11-14 Thread Mel

YES YES! that is exactly what I want.
But I don't know how to do what you are suggesting!

On Nov 14, 2006, at 8:59 AM, tedd wrote:


At 12:31 PM -0800 11/13/06, Mel wrote:

I really don't know?

My site is all php and ready to go live except for this little  
problem.


I would really appreciate some help.

On Nov 13, 2006, at 4:12 AM, John Meyer wrote:

Not to be rude or anything, but if you want to do two things with  
one
click, wouldn't the javascript list be the place you would want  
to go?



Mel:

I think I know what you want, which is when someone clicks  
Bullworks  Logo (for example) that not only does the Logo appear  
on the left, but you want text describing the logo to appear on the  
right, correct?


This can be done via an ajax and php combination. You may want to  
consider that. Plus, there would be no activity in the url portion  
of the user browser -- IMO, it looks cooler.


tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



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



[PHP] one click - two actions?

2006-11-13 Thread Mel
Could someone please help me figure out how to show some description  
(where applicable) at the same time as I show an image, when I click  
on a link, without repeating the entire query?

The image and the description are both in the same table in my database.

I now show the image when I click on the link which is good, but the  
description stays on at all times instead of appearing only when active.


http://www.squareinch.net/single_page.php

This is the code I have for the image area:
/* query 1 from client */
  $query = SELECT * FROM client
where status='active' or status='old'
order by companyName;

  $result = mysql_query($query)
or die (Couldn't execute query);

  while ($aaa = mysql_fetch_array($result,MYSQL_ASSOC))
  { 
  echo span class='navCompany'{$aaa['companyName']}/spanspan  
class='navArrow'   /span\n;


/* query 2 from job */
$query = SELECT * FROM job
WHERE companyId='{$aaa['companyId']}';
$result2 = mysql_query($query)
or die (Couldn't execute query2);

foreach($aaa as $jobType)
{
$bbb = mysql_fetch_array($result2,MYSQL_ASSOC);
			echo span class='navText'a href='single_page.php?art=.$bbb 
['pix'].'{$bbb['jobType']}/a/span\n;

}   
echo br;
}   
?

/div


div class=navbox3?php $image = $_GET['art']; ?
			img src=images/?php print ($image) ?  alt=Portfolio Item  
border=0 width=285 height=285/div



This is the code I have for the description area:

/* query 1 from client */
$query = SELECT * FROM client
where status='active' or status='old'
order by companyName;

$result = mysql_query($query)
or die (Couldn't execute query);

while   ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{   

/* query 2 from job */
$query = SELECT * FROM job
WHERE companyId='{$row['companyId']}';
$result2 = mysql_query($query)
or die (Couldn't execute query2);
$url = mysql_query($result2);

foreach($row as $url)
{
$row = mysql_fetch_array($result2,MYSQL_ASSOC);
if (url={$row['url']})  
		echo span class='navText'a href='{$row['url']}'{$row['web']}/ 
a/span;			

}

echo br;
}
?




Re: [PHP] one click - two actions?

2006-11-13 Thread Mel

I really don't know?

My site is all php and ready to go live except for this little problem.

I would really appreciate some help.

On Nov 13, 2006, at 4:12 AM, John Meyer wrote:


Not to be rude or anything, but if you want to do two things with one
click, wouldn't the javascript list be the place you would want to go?




Re: [PHP] one click - two actions?

2006-11-13 Thread Mel
Thank you for your reply. I think my question is really much more  
simple than what you are suggesting.

If you have a quick look at
http://www.squareinch.net/single_page.php?art=crp_logo.jpg
you will see what I mean.
I have a single page and both results load in the same page.

When I click on a link the picture loads on the left side and the  
info should load on the right side.
Right now the info is visible at all times regardless of what I click  
on!

I need to know how to join my echo statements and/or my query!

On Nov 13, 2006, at 12:57 PM, Warren Vail wrote:



Mel, that may have been a disguised hint.  Your answer lies in
javascript.  The first php page needs to contain javascript to open a
second page with the URL to the second php script when the first page
loads.

Keep a couple of things in mind, popup blockers will reek havoc if you
can't get visitors to your site to stop blocking popups and if you
expect both URLs to receive form contents, you will have to make
arrangements for that in the javascript in your first page, since it
will need to pass the data again.

Check out http://www.hotscripts.com for some links to sites with the
necessary javascript.

Hope this helps,

Warren Vail

-Original Message-
From: Mel [mailto:[EMAIL PROTECTED]
Sent: Monday, November 13, 2006 12:32 PM
To: John Meyer
Cc: PHP General List
Subject: Re: [PHP] one click - two actions?

I really don't know?

My site is all php and ready to go live except for this little  
problem.


I would really appreciate some help.

On Nov 13, 2006, at 4:12 AM, John Meyer wrote:


Not to be rude or anything, but if you want to do two things with one
click, wouldn't the javascript list be the place you would want to  
go?





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



Re: [PHP] why so slow?

2006-11-02 Thread Mel
Thank you both so much. I did change the name. I was chocked to see  
all my passwords displayed in the browser!


On Nov 2, 2006, at 1:15 PM, Dave Goodchild wrote:

Better still, keep them outside the docroot. If you do insist on  
having them
inside and insist on calling them *.inc, create an .htaccess file  
that stops

download of *.inc files.


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



Re: [PHP] why so slow?

2006-11-01 Thread Mel

So do you mean that's it is ok and not slow?

On Nov 1, 2006, at 1:09 AM, Robert Cummings wrote:


On Wed, 2006-11-01 at 00:55 -0800, Mel wrote:

Could you think of why my site loads so slowly?

http://www.squareinch.net/home.php


That's a bit like asking us to read your mind. We'd only be guessing
since we can't see your code and you haven't told us what your site
does.

What I can say is that it's probably not reverse DNS since my first  
page

load was about 8 seconds, my second was about .5 seconds, and my third
was about 6 seconds.

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'



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



Re: [PHP] why so slow?

2006-11-01 Thread Mel

This is my first php site and I have no idea where to look for a reason!

On Nov 1, 2006, at 1:07 AM, Frank Arensmeier wrote:


Bad day?

/frank

1 nov 2006 kl. 09.55 skrev Mel:


Could you think of why my site loads so slowly?

http://www.squareinch.net/home.php




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



Re: [PHP] why so slow?

2006-11-01 Thread Mel

I took the Google stuff out. I can't tell if it's faster now.
I don't think it's very consistent. Sometimes it loads pretty fast  
and sometimes it gets stuck in the right corner!

I don't think I have seen this happen with any other site!

On Nov 1, 2006, at 2:12 AM, Frank Arensmeier wrote:

My suggestion: stripp out the JS from Google. Test you page again.  
Should the page load as slowly as before, it might have to do with  
PHP. Then, give us more details about your script)


/frank

1 nov 2006 kl. 10.53 skrev Robert Cummings:


On Wed, 2006-11-01 at 01:26 -0800, Mel wrote:

So do you mean that's it is ok and not slow?


I'm saying we can't ascertain why it's so slow since we don't have
enough information.

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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






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



Re: [PHP] why so slow?

2006-11-01 Thread Mel
 = mysql_fetch_array($result2,MYSQL_ASSOC);
if (url={$row['url']})

			echo span class='navText'a href={$row['url']}{$row['url']}/ 
a/span\n;


}





echo br;

}

?

!-- * end info/box 4  --

/td

td width=213 height=289
/td
/tr
/table
/td
/tr
/table

/body
/html

On Nov 1, 2006, at 2:10 AM, Frank Arensmeier wrote:


Please send a CC of your answer to the PHP list as well...

/frank

Vidarebefordrat brev:


Från: Toby Osbourn [EMAIL PROTECTED]
Datum: onsdag 1 nov 2006 10.57.17 GMT+01:00
Till: Frank Arensmeier [EMAIL PROTECTED]
Ämne: Re: [PHP] why so slow?

Yeah it will be that hit counter or whatever it is you are trying  
to load - I had one myself that used JS and was hosted on another  
website and held up the page it was on by a good 3-4 seconds, and  
that was on a good day.


On 01/11/06, Frank Arensmeier [EMAIL PROTECTED]  
wrote:

Maybe it's the 18 k of JavaScript from Google that slows your page
down? Why not load this script locally from your server?

/frank

1 nov 2006 kl. 10.26 skrev Mel:

 So do you mean that's it is ok and not slow?

 On Nov 1, 2006, at 1:09 AM, Robert Cummings wrote:

 On Wed, 2006-11-01 at 00:55 -0800, Mel wrote:
 Could you think of why my site loads so slowly?

 http://www.squareinch.net/home.php

 That's a bit like asking us to read your mind. We'd only be  
guessing
 since we can't see your code and you haven't told us what your  
site

 does.

 What I can say is that it's probably not reverse DNS since my
 first page
 load was about 8 seconds, my second was about .5 seconds, and my
 third
 was about 6 seconds.

 Cheers,
 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'


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



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




--
http://www.borninblood.co.uk






Re: [PHP] Re: [BULK] [PHP] why so slow?

2006-11-01 Thread Mel

:)
I know it is a dedicated server on westhost.com
I wouldn't know how to check for the kind of connection!
thanks, and all the best...

On Nov 1, 2006, at 3:10 AM, clive wrote:


Mel wrote:

Could you think of why my site loads so slowly?
http://www.squareinch.net/home.php


perhaps its the server that its hosted on, is it a dedicated  
machine,shared or a virtual private server.

It could also be the bandwidth the server has,
It could be the route taken to get to the machine.
It could even be the weather (If anyone knows anything about a  
certain ISP in South Africa you'll know what I mean)


In poor old bandwidth starved S.Africa your page takes 10 - 14  
seconds to load (used the hippopotamus counting technique i.e 1  
hippopotamus, 2 hippopotamus etc, yes yes very African I know),  
then again the weather affects our bandwidth and then again  
google.com loads with a second so I reckon its something else.


Can you check the server loads and perhaps find out what sort of  
connection the box has?


Clive

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



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



Re: [PHP] Re: [BULK] [PHP] why so slow?

2006-11-01 Thread Mel

ok, thank you. I am on it!

On Nov 1, 2006, at 3:24 AM, Dave Goodchild wrote:

The guys are right, there are many variables that could be  
affecting this.
However, get rid of those tags before body and clean up your code  
- it
does not validate as html 4.01. The DOCTYPE should be the very  
first thing
in the page. Once you have amended these, revalidate  
(validator.w3c.org).
Trust me, these issues will be much easier to solve given clean  
code and
points of error are easier to locate. Reload when the page is  
clean. It may

not be the html, but it is better to start on the right foot.


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



Re: [PHP] why so slow?

2006-11-01 Thread Mel

ok

I have fixed my html and include
http://www.squareinch.net/client_testing_html401.php

could you please help me figure out how to change the query in box 4  
so that it shows the url only when the link is active?


On Nov 1, 2006, at 5:11 AM, Robin Vickery wrote:


On 01/11/06, Mel [EMAIL PROTECTED] wrote:

Thank you so much.

Yes, I was afraid of putting my passwords...
I can move the include file outside the directory, but what do you
mean by include the file directly


Please respond to the list

What I meant was to do this:

  include('/path/to/my/include/misc.inc');

rather than this:

  include('http://www.squareinch.net/include/misc.inc');

The first includes the file directly, the second makes an http request
to www.squareinch.net and includes the response.

-robin

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





Re: [PHP] why so slow?

2006-11-01 Thread Mel

I have

this is the page I am working on right now and it is valid html 4.01

http://www.squareinch.net/client_testing_html401.php

On Nov 1, 2006, at 5:32 AM, Dave Goodchild wrote:

Take out the comment before the DOCTYPE. There should be nothing  
before it.




Re: [PHP] why so slow?

2006-11-01 Thread Mel

Your advice is well taken and thank you.

I do have a book with the help of which I made this site and I have  
been working on it for many many weeks. (ashamed to say exactly how  
many!) Remember your first ever php site?


I truly do appreciate all the help I got and it did lead me to  
validate my html, change my links ...


I am sure there are things even you don't know or understand and that  
you can use help from other more experienced and generous people who  
are willing to share.


On Nov 1, 2006, at 12:20 PM, John Nichel wrote:


Mel wrote:

I have
this is the page I am working on right now and it is valid html 4.01
http://www.squareinch.net/client_testing_html401.php



Bzzttt.  No, it isn't.

The people here have been pretty accommodating of you so far, but  
if you continue to *not* do any research yourself, continue to  
*not* understand the basics of what you are trying to do, the  
accommodation will end quickly.


Buy a book.  Read some online manuals.  Google.  Learn how to  
troubleshoot.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



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



Fwd: [PHP] confused about where to load images

2006-10-05 Thread mel

 I still can't make it work.

This is what I have for the link to my images in navbar.php:

foreach($row as $jobType)
{
$row = mysql_fetch_array($result2,MYSQL_ASSOC);
echo a href='homehome.php?art=.$row['pix']. border='0'{$row 
['jobType']}/a;


}

and this is what I have in my homehome.php (inside the grey frame)  
where I want the images to load:


?php
$image = $_GET['art'];
?
img src=images/?php print($image)?  border=5 width=289  
height=289



http://www.squareinch.net/homehome.php

if www is my main directory, my file structure is:
www/homehome.php
www/images/...
www/include/header.html
www/include/footer.html
www/include/navbar.php

Thank you



On Oct 5, 2006, at 4:19 AM, Jeremy Jefferson wrote:


foreach($row as $jobType)
{
$row = mysql_fetch_array($result2,MYSQL_ASSOC); /* array variable= 
$row */
echo a href=portfolio2.php?logo= . $row['pix'] .  border='0' 
{$row['jobType']} /a ;

}
- Original Message -
From: Mel
To: Jeremy Jefferson
Sent: Thursday, October 05, 2006 7:00 AM
Subject: Re: [PHP] confused about where to load images

Hello Jeremy and thank you so much for your reply.

I am not sure where to add your code!!

My logos are dynamically generated by the code bellow from a MySql  
database!


foreach($row as $jobType)
{
$row = mysql_fetch_array($result2,MYSQL_ASSOC); /* array variable= 
$row */
echo a href='images/{$row['pix']}' border='0'{$row['jobType']}  
/a ;

}



On Oct 5, 2006, at 3:41 AM, Jeremy Jefferson wrote:

You need to change the logo links to link to portfolio2.php? 
logo=logonamehere









[PHP] Re: Securing areas of a web site with PHP

2003-01-01 Thread Mel Lester Jr.
You might consider using cookies that keep track of the user's
login name and a bitwise status to control AAA (Authentication,
Authorization, and Access0 controls instead of using session variables.

-mel

On Wed, 1 Jan 2003, Jean-Christian Imbeault wrote:

 On my web site there are some areas that I want to make accessible only 
 after a user has logged in (for example when placing an order, etc ...) 
 I have been able to achieve this however I have the following problem:
 
 1- user logs in
 2- user goes to restricted area
 3- user views pages, orders an item, changes his account settings, etc ...
 4- user logs out
 5- user is sent to log out page
 6- user hits back button ...
 
 And here my problems start ... even though the user has logged out, all 
 the restricted pages he saw are still cached by his browser and 
 accessible ...
 
 I have tried using a script that checks a session variable that 
 indicates if a user is logged in or not and take appropriate action at 
 the start of all restricted pages, but that doesn't work since when 
 the user hits the back button, the PHP script is not re-executed, the 
 page is simply loaded from the browser cache.
 
 What are some PHP techniques I could use so that a user can no longer 
 access/use pages once he has logged out?
 
 Basically I would like to have sort of state machine so I that I can 
 simply check where a user is coming from and his login state to decide 
 if a certain page should be presented or not (i.e. you can't get here 
 form there or you can't view that page with your current login status).
 
 But it seemed that creating a state machine is not the right way to go 
 about it since hitting the back button pretty much allows a user to 
 circumvent this ...
 
 Eventually the web site I will build will actually have many areas, 
 each needing a separate/different login, (and you can be logged in to 
 multiple areas at once) so I would like to be able to generalize this 
 problem and understand how I can use PHP to implement the needed 
 functionality.
 
 Just as a simple example, once a user has placed an order, he should not 
 be able to go back to the order placing/processing pages ...
 
 Any tips, hints, or pointers to tutorials are appreciated!
 
 Thanks,
 
 Jc
 
 


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