Re: [PHP] Links (A HREF) loosing my session

2008-06-02 Thread Ted Wood


1. If you're using cookies, there's no need to pass the session name  
via the URL.

2. Is the cookie being created?

~Ted



On 2-Jun-08, at 11:32 AM, Razer Montaño wrote:


 Hello All, my first time here at list.

 Well, I am with a very weird question, never happened with me,
always worked fine.

 First of all, I am using WAMP (php 5.2.6, apache 2.2.8, mysql
5.0.51b), Firefox (All
cookies allowed), Windows XP SP 3 (I think ;-)... Ah, the
session.save_path property is pointing
to a valid path and the session files are been created there. The
session.cookie_domain I leave
in blank, as I saw in other forum.

 That code below is not working properly. First time it creates the
session and show me
First activation etc etc. If I press CTRL-R (Firefox, but I tested
in IE too), it gets the same
session, showing me the next number.

 If I press First Link (Again 1), it creates a NEW SESSION, when It
would get the old one. And now,
every CTRL-R is getting me a new session. Only If I go at address bar
and hit ENTER, I can get
the very first session created.

 The second link (Again 2) is a test. I saw that, if I set:

session.use_only_cookies=0
session.use_trans_sid=1

 this link works fine. But, I don't want to pass Session ID every
link. I tried to set the properties above
in other ways, but I get the same behavior: session lost in every  
link click.


 Could someone execute this script, to see if it has some wrong?

 Could you please help me...

   Thank you in advance.

   Razer.

?php
session_start();
if (!isset($_SESSION['test'])) {
echo First activation: setting session variable;
$_SESSION['test'] = 1;
} else {
echo SESSIONS ARE WORKING! activation: , (++$_SESSION['test']);
?
bra href=http://localhost:8081/testesession.php;Again 1/a
br
bra href=http://localhost:8081/testesession.php??php echo
session_name().'='.session_id();?Again 2/a
?php
}
echo br . session_id() . brbr;
?

--

Razer Anthom Nizer Rojas Montaño

--
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] Links (A HREF) loosing my session

2008-06-02 Thread Razer Montaño
   Yes, the cookie is being created. I show it in Firefox (Tools |
Options | Privacy | Show Coockies).

   So the Session File, is being created at session.save_path, as
configured in PHP.INI.

:(

Thank you for your response.


2008/6/2 Ted Wood [EMAIL PROTECTED]:

 1. If you're using cookies, there's no need to pass the session name via the
 URL.
 2. Is the cookie being created?

 ~Ted



 On 2-Jun-08, at 11:32 AM, Razer Montaño wrote:

  Hello All, my first time here at list.

  Well, I am with a very weird question, never happened with me,
 always worked fine.

  First of all, I am using WAMP (php 5.2.6, apache 2.2.8, mysql
 5.0.51b), Firefox (All
 cookies allowed), Windows XP SP 3 (I think ;-)... Ah, the
 session.save_path property is pointing
 to a valid path and the session files are been created there. The
 session.cookie_domain I leave
 in blank, as I saw in other forum.

  That code below is not working properly. First time it creates the
 session and show me
 First activation etc etc. If I press CTRL-R (Firefox, but I tested
 in IE too), it gets the same
 session, showing me the next number.

  If I press First Link (Again 1), it creates a NEW SESSION, when It
 would get the old one. And now,
 every CTRL-R is getting me a new session. Only If I go at address bar
 and hit ENTER, I can get
 the very first session created.

  The second link (Again 2) is a test. I saw that, if I set:

 session.use_only_cookies=0
 session.use_trans_sid=1

  this link works fine. But, I don't want to pass Session ID every
 link. I tried to set the properties above
 in other ways, but I get the same behavior: session lost in every link
 click.

  Could someone execute this script, to see if it has some wrong?

  Could you please help me...

   Thank you in advance.

   Razer.

 ?php
 session_start();
 if (!isset($_SESSION['test'])) {
 echo First activation: setting session variable;
 $_SESSION['test'] = 1;
 } else {
 echo SESSIONS ARE WORKING! activation: , (++$_SESSION['test']);
 ?
 bra href=http://localhost:8081/testesession.php;Again 1/a
 br
 bra href=http://localhost:8081/testesession.php??php echo
 session_name().'='.session_id();?Again 2/a
 ?php
 }
 echo br . session_id() . brbr;
 ?

 --
 
 Razer Anthom Nizer Rojas Montaño

 --
 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





-- 

Razer Anthom Nizer Rojas Montaño

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



Re: [PHP] Links hierarchy maintenance

2008-03-10 Thread Per Jessen
Adil Drissi wrote:

 should be displayed differently. I was wondering if
 there is a way to do the same thing without the
 overhead of all that if  statements.

If you're using PHP (or any other interpreted language) overhead is a
fact of life, there's little you can do about it. 


/Per Jessen, Zürich


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



Re: [PHP] Links hierarchy maintenance

2008-03-10 Thread tedd

At 6:13 PM -0700 3/9/08, Adil Drissi wrote:

Yes like that, but you can consider also that the
vertical menu has different style for the link of the
current page. Anyway it does not matter for this
problem. Can you show us how your php function looks
like? Or maybe you are just doing a test for each link
for your function to know if it is the link that
should be displayed differently. I was wondering if
there is a way to do the same thing without the
overhead of all that if  statements.
 

 Two menus, do you mean like this:


 
http://webbytedd.com/clients/beckyscan/about-company.php



No offense meant, but if you're concerned about the if overhead 
then I question if you would understand how the double menu works.


Cheers,

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



Re: [PHP] Links hierarchy maintenance

2008-03-09 Thread Per Jessen
Adil Drissi wrote:

 Hi,
 
 Yes this is the correct way to do things. As i said,
 i'm using different styles for the menus links
 indicating the current page. Suppose my page has one
 horiontal menu at the top and one vertical menu at the
 left. In this case, one element of the horizontal menu
 and one from the vertical menu will be displayed
 differently from the other elements. So the function
 that will be inluded will be more complex to handle
 this. I was just wondering, how other poeple are
 dealing with that. Of course it is feasable, but i
 want to do it the best way.

CSS ?  If that's not enough to alter the display, you need to make your
includes sensitive to or aware of the context they're being included
in. 


/Per Jessen, Zürich


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



Re: [PHP] Links hierarchy maintenance

2008-03-09 Thread Adil Drissi
Hi Jessen,

The question is how to make it aware of the context.
Do you know any work dealing with that?

Thanks

--- Per Jessen [EMAIL PROTECTED] wrote:

 Adil Drissi wrote:
 
  Hi,
  
  Yes this is the correct way to do things. As i
 said,
  i'm using different styles for the menus links
  indicating the current page. Suppose my page has
 one
  horiontal menu at the top and one vertical menu at
 the
  left. In this case, one element of the horizontal
 menu
  and one from the vertical menu will be displayed
  differently from the other elements. So the
 function
  that will be inluded will be more complex to
 handle
  this. I was just wondering, how other poeple are
  dealing with that. Of course it is feasable, but i
  want to do it the best way.
 
 CSS ?  If that's not enough to alter the display,
 you need to make your
 includes sensitive to or aware of the context
 they're being included
 in. 
 
 
 /Per Jessen, Zürich
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] Links hierarchy maintenance

2008-03-09 Thread Per Jessen
Adil Drissi wrote:

 Hi Jessen,
 
 The question is how to make it aware of the context.
 Do you know any work dealing with that?

Variables?  Set a variable $context= before you include, then have your
include check on $context. 


/Per Jessen, Zürich


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



Re: [PHP] Links hierarchy maintenance

2008-03-09 Thread tedd

Yes this is the correct way to do things. As i said,
i'm using different styles for the menus links
indicating the current page. Suppose my page has one
horiontal menu at the top and one vertical menu at the
left. In this case, one element of the horizontal menu
and one from the vertical menu will be displayed
differently from the other elements. So the function
that will be inluded will be more complex to handle
this. I was just wondering, how other poeple are
dealing with that. Of course it is feasable, but i
want to do it the best way.

I hope the problem i posted is clearer now


Two menus, do you mean like this:

http://webbytedd.com/clients/beckyscan/about-company.php

It's still just css and php -- simply a logic problem.

Cheers,

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



Re: [PHP] Links hierarchy maintenance

2008-03-09 Thread Adil Drissi
Yes like that, but you can consider also that the
vertical menu has different style for the link of the
current page. Anyway it does not matter for this
problem. Can you show us how your php function looks
like? Or maybe you are just doing a test for each link
for your function to know if it is the link that
should be displayed differently. I was wondering if
there is a way to do the same thing without the
overhead of all that if  statements.

--- tedd [EMAIL PROTECTED] wrote:

 Yes this is the correct way to do things. As i
 said,
 i'm using different styles for the menus links
 indicating the current page. Suppose my page has
 one
 horiontal menu at the top and one vertical menu at
 the
 left. In this case, one element of the horizontal
 menu
 and one from the vertical menu will be displayed
 differently from the other elements. So the
 function
 that will be inluded will be more complex to handle
 this. I was just wondering, how other poeple are
 dealing with that. Of course it is feasable, but i
 want to do it the best way.
 
 I hope the problem i posted is clearer now
 
 Two menus, do you mean like this:
 

http://webbytedd.com/clients/beckyscan/about-company.php
 
 It's still just css and php -- simply a logic
 problem.
 
 Cheers,
 
 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
 
 



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



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



Re: [PHP] Links hierarchy maintenance

2008-03-08 Thread tedd

At 9:23 AM -0800 3/8/08, Adil Drissi wrote:

I'm working on a site that is becoming more and more
bigger (containing more links). Now the problem of
links maintenance arises. An intuitive idea that i'm
trying to do right know is calling php functions that
will display every part of the site that is
repetitive. For example left side menu and footer. For
the left side menu with static HTML and CSS i'm
disabling the link to the actual page, like that the
user has a visual presentation allowing him to know
where he is exaclty in the site. This introduces more
difficulty for the function that will display the
menu. So i'm wondering if there is some efficient way
of modeling and implementing this.

All suggestions are welcome, and if some part of the
problem is not clear enough please feel free to ask me
more questions if necessary.


In all of my pages, I use includes. I have one include for the 
header, one for the footer and one for the navigation, which is 
usually called by the header.


If something changes in navigation, I change one file and it's done 
throughout the site.


Look into includes.

Cheers,

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



Re: [PHP] Links hierarchy maintenance

2008-03-08 Thread Adil Drissi
Hi,

Yes this is the correct way to do things. As i said,
i'm using different styles for the menus links
indicating the current page. Suppose my page has one
horiontal menu at the top and one vertical menu at the
left. In this case, one element of the horizontal menu
and one from the vertical menu will be displayed
differently from the other elements. So the function
that will be inluded will be more complex to handle
this. I was just wondering, how other poeple are
dealing with that. Of course it is feasable, but i
want to do it the best way.

I hope the problem i posted is clearer now
 
--- tedd [EMAIL PROTECTED] wrote:

 At 9:23 AM -0800 3/8/08, Adil Drissi wrote:
 I'm working on a site that is becoming more and
 more
 bigger (containing more links). Now the problem of
 links maintenance arises. An intuitive idea that
 i'm
 trying to do right know is calling php functions
 that
 will display every part of the site that is
 repetitive. For example left side menu and footer.
 For
 the left side menu with static HTML and CSS i'm
 disabling the link to the actual page, like that
 the
 user has a visual presentation allowing him to know
 where he is exaclty in the site. This introduces
 more
 difficulty for the function that will display the
 menu. So i'm wondering if there is some efficient
 way
 of modeling and implementing this.
 
 All suggestions are welcome, and if some part of
 the
 problem is not clear enough please feel free to ask
 me
 more questions if necessary.
 
 In all of my pages, I use includes. I have one
 include for the 
 header, one for the footer and one for the
 navigation, which is 
 usually called by the header.
 
 If something changes in navigation, I change one
 file and it's done 
 throughout the site.
 
 Look into includes.
 
 Cheers,
 
 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
 
 



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


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



Re: [PHP] links and variables

2007-04-12 Thread Jochem Maas
Dan Shirah wrote:
 Greetings!
 
 I have a page that has several links that point to the same page.  I
 want to
 pass a variable to the linked page depending on which link the user clicks
 to only display a result set that is relevant to the link clicked.  I know
 clicking on a link does not submit the page, so there would not be a $_POST
 value assigned.   Is there a way to pass a hidden value through a link
 without requiring the submit?
 
 If not, do you think it would make more sense to create three seperate
 pages
 for the link to point to?
 
 Or put form tags around the content and leave the action blank and then
 just
 use the javascript onClick form.action='mypage'; ??

it looks like the links initiate payment processing - given that this is
not something you'd want to activate from a URL that someone bookmarked I 
suggest
you go the simple route of creating a form with 3 buttons and have your
Process script react depending on which button was clicked.

- ps - it's not hard to make a button look like a link with a bit of CSS.

 
 tr
td valign=topa href=/Process/Process.php class=med To Be
 Corrected/a/td
tdspan class=TableLineCorrect erroneous payment
 requests./span/td
  /tr
  tr
td width=235 valign=topa href=/Process/Process.php
 class=medTo
  Be Processed/a/td
td width=353span class=TableLineProcess received payment
 requests./span/td
  /tr
  tr
td valign=topa href=/Process/Process.php class=medTo Be
 Reviewed/a/td
tdspan class=TableLineView payment requests that require special
 attention../span/td
  /tr
 

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



Re: [PHP] links and variables

2007-04-12 Thread Richard Lynch
On Thu, April 12, 2007 9:14 am, Dan Shirah wrote:
 I have a page that has several links that point to the same page.  I
 want to
 pass a variable to the linked page depending on which link the user
 clicks
 to only display a result set that is relevant to the link clicked.  I
 know
 clicking on a link does not submit the page, so there would not be a
 $_POST
 value assigned.   Is there a way to pass a hidden value through a link
 without requiring the submit?

It won't be hidden, but you can do:
a href=whatever.php?from=11/a
a href=whatever.php?from=22/a
a href=whatever.php?from=33/a

In whatever.php, you'll know which link because of what's in
$_GET['from']:

$from = (int) $_GET['from'];
switch($from){
  case 1:
  case 2:
  case 3:
echo From link $frombr /\n;
  break;
  default:
echo From unknown link: $frombr /\n;
  break;
}

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Links

2007-03-07 Thread fedt

:|

if i want link 3,

$result = mysql_query(SELECT address FROM db.links WHERE link_id=3);
$foo = mysql_fetch_assoc($result);
echo 'a href='.$foo['address'].'this is link 3/a';

On 3/7/07, StainOnRug [EMAIL PROTECTED] wrote:



Hello.. I searched for an answer on the simple quesiton but I am only
finding
complex answers... I simply just want to add a link in my database so when
my results display you can see the information.. and when they click the
link it takes them to the webpage of the article. I tried inserting
examplesite.com User sees this text   but when the results page shows.. it
doesnt show the hyperlink.. Thank you all very much!



  -Darren

   Thanks again!
--
View this message in context:
http://www.nabble.com/Links-tf3366303.html#a9365950
Sent from the PHP - General mailing list archive at Nabble.com.

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





--
|~ fedt ~|


Re: [PHP] Links

2007-03-07 Thread Jake McHenry
You have to add the href tags in the html output for the text to be a 
link


in your while statement or whatever your using to obtains the links from the 
database already,


instead of just displaying $link_value, change it to

a href=$link_value$link_value/a


Jake

- Original Message - 
From: StainOnRug [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Wednesday, March 07, 2007 7:19 PM
Subject: [PHP] Links




Hello.. I searched for an answer on the simple quesiton but I am only 
finding

complex answers... I simply just want to add a link in my database so when
my results display you can see the information.. and when they click the
link it takes them to the webpage of the article. I tried inserting
examplesite.com User sees this text   but when the results page shows.. it
doesnt show the hyperlink.. Thank you all very much!



 -Darren

  Thanks again!
--
View this message in context: 
http://www.nabble.com/Links-tf3366303.html#a9365950

Sent from the PHP - General mailing list archive at Nabble.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



Re: [PHP] LINKS

2005-09-24 Thread Gustav Wiberg
- Original Message - 
From: php @ net mines [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Saturday, September 24, 2005 4:34 PM
Subject: [PHP] LINKS



Hi all

is there a way to have a program detecting when a link was clicked and 
automatically opening another window (that can plugged-in in any 
website - running php of course)?

I know... I hate pop-ups too but a client asked for it...

Thanks

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


Hi!

I don't if I really understand you're question, but as I see it is done on 
the clientside (webbrowser)


a href=Javascript:popup(url1, url2);Link is clicked/a

the popup-function in Javascript opens url1 in one window and url2 opens up 
in a new window.

So a tip is to consult a Javascript-mailinglist.

/G
http://www.varupiraten.se/

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



Re: [PHP] LINKS

2005-09-24 Thread Rory Browne
On 9/24/05, php @ net mines [EMAIL PROTECTED] wrote:
 Hi all

 is there a way to have a program detecting when a link was clicked and
 automatically opening another window (that can plugged-in in any website -
 running php of course)?

That would be done using client-side JS.

you would define a JS function to do the opening, and then you would
iterate through all a tags setting the onClick handler to call your
function.

Then again on the other hand, maybe you shouldn´t. Maybe you should
just tell your client where to stick his pop-up.  I personally
consider an unrequested pop-up to be a virus, and send it straight to
my pop-up blocker.


 I know... I hate pop-ups too but a client asked for it...

 Thanks

 M

 --
 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] Links exchange with http://php-faq.com. OT - SPAM

2005-04-19 Thread Mattias Thorslund
Ann Clark wrote:
Hello,
 We would like to exchange links between your site http://php-faq.com and 
our new exciting casino web site.
Our site do NOT offer online gambling, it have information about different 
aspects of gambling and so it's very good and informative from our point of 
view.
We require that our link to you is reciprocated. So please add our link to your 
site and send us it location, we will reply within 72 hours.
Information about our site is next:
 

[snipped link]
Link Title: Online Casinos
Description: All Best Online Casino Games are here!

Best regards, Ann Clark.
 

It would be nice if the above piece of blatant spam were removed from 
the archives, since the spammer's objective most likely is to improve 
their Google rank...

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


RE: [PHP] Links displaying in Table cells

2004-12-07 Thread Vincent DUPONT
you should add a iframe into your table cell and load the target page (link) 
into that iframe.
maybe some javacsript could create the iframe for you and set its width and 
height.

I Never did this, so this is purely a suggestion

Vincent

-Original Message-
From: Tomar Rajeev (ext) [mailto:[EMAIL PROTECTED]
Sent: mardi 7 décembre 2004 11:17
To: '[EMAIL PROTECTED]'
Subject: [PHP] Links displaying in Table cells


Dear All,

After clicking on a link of a menu in a PHP page, I want to display that
link in cell of a table. Please let me know how to open this link in a table
cell.

Thanking in anticipation. 

Thanks and Regards,

Rajeev Tomar

-- 
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] Links displaying in Table cells

2004-12-07 Thread Richard Lynch
 After clicking on a link of a menu in a PHP page, I want to display that
 link in cell of a table. Please let me know how to open this link in a
 table
 cell.

You mean like this?

HTMLBODY
  A HREF=?=$PHP_SELF??target=http://php.net;PHP/A
  TABLE
TRTD?=isset($_GET['target']) ? $_GET['target'] : ''?/TD/TR
  /TABLE
/BODY/HTML


You may also want to consider not using PHP at all, but using JavaScript
and 'innerHTML' property of a table cell.  Hard to tell from your
question.


-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] Links with parameters in DB

2004-08-19 Thread Jay Blanchard
[snip]
$link=eval(mysql_result($result,$i,link));
[/snip]

Try just eval on the field you pull from the database...

echo eval($databaseItem) then work your processing.

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



RE: [PHP] Links with parameters in DB

2004-08-19 Thread Jay Blanchard
[snip]
$i=0;
$q=select * from links';
while ($imysql_num_rows($result))
  {
   $link=eval(mysql_result($result,$i,link));
.
.
 and then i put this:
[/snip]

What happens if you do this?

while($i  mysql_num_rows($result)){
$link = eval($result);
echo $link;
}


P.S. Please reply to the list too, I am quite busy and may not be able
to follow up.

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



Re: [PHP] Links with parameters in DB

2004-08-19 Thread WebMaster. Radio ECCA
It doesn´t work, I have other fields in the DB apart from the field 'Link',
so if I use
$link = eval($result);
I get a parse error. Apart from that, I have to write the name of the field
(link), if not the server won´t know the field I´m refering to.
Thanks

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: WebMaster. Radio ECCA [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, August 19, 2004 1:28 PM
Subject: RE: [PHP] Links with parameters in DB


[snip]
$i=0;
$q=select * from links';
while ($imysql_num_rows($result))
  {
   $link=eval(mysql_result($result,$i,link));
.
.
 and then i put this:
[/snip]

What happens if you do this?

while($i  mysql_num_rows($result)){
$link = eval($result);
echo $link;
}


RE: [PHP] Links with parameters in DB

2004-08-19 Thread Jay Blanchard
[snip]
It doesn´t work, I have other fields in the DB apart from the field 'Link',
so if I use
$link = eval($result);
I get a parse error. Apart from that, I have to write the name of the field
(link), if not the server won´t know the field I´m refering to.
[/snip]

Then did you eval that? I meant for you to use a proper rendering of the eval 
statement by itself, i.e.

$sql = SELECT * FROM table ;
$result = mysql_query($sql, $connection);

while($row = mysql_fetch_array($result)){
$link = eval($row['Link']);
echo $link;
}

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



Re: [PHP] Links with parameters in DB

2004-08-19 Thread WebMaster. Radio ECCA
I tried what you said but i get an eval error:
  Parse error: parse error, unexpected '=' in /index.php(135) : eval()'d
code on line 1

  ;(
- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: WebMaster. Radio ECCA [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, August 19, 2004 1:38 PM
Subject: RE: [PHP] Links with parameters in DB


[snip]
It doesn´t work, I have other fields in the DB apart from the field 'Link',
so if I use
$link = eval($result);
I get a parse error. Apart from that, I have to write the name of the field
(link), if not the server won´t know the field I´m refering to.
[/snip]

Then did you eval that? I meant for you to use a proper rendering of the
eval statement by itself, i.e.

$sql = SELECT * FROM table ;
$result = mysql_query($sql, $connection);

while($row = mysql_fetch_array($result)){
$link = eval($row['Link']);
echo $link;
}

-- 
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] Links with parameters in DB

2004-08-19 Thread Jay Blanchard
[snip]
I tried what you said but i get an eval error:
  Parse error: parse error, unexpected '=' in /index.php(135) : eval()'d
code on line 1
[/snip]

You will probably have to escape the equals sign

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



RE: [PHP] Links with parameters in DB

2004-08-19 Thread Jay Blanchard
[snip]
[snip]
I tried what you said but i get an eval error:
  Parse error: parse error, unexpected '=' in /index.php(135) : eval()'d
code on line 1
[/snip]

You will probably have to escape the equals sign
[/snip]

Have you RTFM on eval? http://www.php.net/eval

You have to use valid PHP code. Your stored code is currently not valid
if I read this correctly.

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



Re: [PHP] Links with parameters in DB

2004-08-19 Thread Matt M.
On Thu, 19 Aug 2004 14:01:45 +0100, WebMaster. Radio ECCA
[EMAIL PROTECTED] wrote:
 I tried what you said but i get an eval error:
   Parse error: parse error, unexpected '=' in /index.php(135) : eval()'d
 code on line 1
 
   ;(
 
 
 - Original Message -
 From: Jay Blanchard [EMAIL PROTECTED]
 To: WebMaster. Radio ECCA [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, August 19, 2004 1:38 PM
 Subject: RE: [PHP] Links with parameters in DB
 
 [snip]
 It doesn´t work, I have other fields in the DB apart from the field 'Link',
 so if I use
 $link = eval($result);
 I get a parse error. Apart from that, I have to write the name of the field
 (link), if not the server won´t know the field I´m refering to.
 [/snip]
 
 Then did you eval that? I meant for you to use a proper rendering of the
 eval statement by itself, i.e.
 
 $sql = SELECT * FROM table ;
 $result = mysql_query($sql, $connection);
 
 while($row = mysql_fetch_array($result)){
 $link = eval($row['Link']);
 echo $link;
 }
 
 --
 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
 
 
try this

eval(\$link = \$row[Link]\;);
echo $link;

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



Re: [PHP] Links of Tables from other DB

2003-12-18 Thread Raditha Dissanayake
Hi,

From your post i the the proper use of databases hasn't 'sunk in' yet. 
I propose that you head off to one of the sites such as phpbuilder.com 
or devshed.com where you will find lots of articles on dbs as well as 
how to use them with php.

all the best

KidLat Ngayon wrote:

Greetings Guyz.

I would just like to ask for a help regarding on
Links of Tables from other DB. I'm just only a
newbie in PHP Programming.
What I have right now is a query result from my table,
and what I wanted to do is on my one of the table I
had is to have a link or button that will open another
page that will get the data from the other table.
It would be highly appreciated if anyone could give me
a sample script or link for a tutorial.
Many Thanks in advance.

Regards,

ERWIN

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Links of Tables from other DB

2003-12-18 Thread Blake Schroeder
This is the tutorial i used
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html
KidLat Ngayon wrote:

Greetings Guyz.

I would just like to ask for a help regarding on
Links of Tables from other DB. I'm just only a
newbie in PHP Programming.
What I have right now is a query result from my table,
and what I wanted to do is on my one of the table I
had is to have a link or button that will open another
page that will get the data from the other table.
It would be highly appreciated if anyone could give me
a sample script or link for a tutorial.
Many Thanks in advance.

Regards,

ERWIN

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
 

--

+-+-++
| Blake Schroeder | Owner/Developer |lhwd.net|
+--(http://www.lhwd.net)+--/3174026352\--+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Links in e-mail

2003-05-30 Thread Joe Stump
Most MUA's will convert http://* or www.* to a link. Otherwise you'll have
to send MIME encoded HTML with a href=/a tags. The problem with the
second solution is that not all MUA's (ie. mutt) support MIME encoded HTML
messages.

--Joe

--
Joe Stump [EMAIL PROTECTED]
http://www.joestump.net
Label makers are proof God wants Sys Admins to be happy.

-Original Message-
From: christian tischler [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Links in e-mail


I use mail() to send e-mail automatically.

But all I can send is text. I would like to send links, but can figure out
how to make them work.

Thanks,

Christian



--
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] Links in e-mail

2003-05-30 Thread Adam Voigt
For the third parameter of the mail command, use:

Content-type:text/html\r\n

I.E.:

mail($to,$subject,$body,Content-type:text/html\r\n);

On Thu, 2003-05-29 at 11:13, christian tischler wrote:
 I use mail() to send e-mail automatically.
 
 But all I can send is text. I would like to send links, but can figure out
 how to make them work.
 
 Thanks,
 
 Christian
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] Links in e-mail

2003-05-30 Thread ruusvuu
$link = http://somedomain.com;;

$msg .= $link\n;


Quoting christian tischler [EMAIL PROTECTED]:

 I use mail() to send e-mail automatically.
 
 But all I can send is text. I would like to send links, but can figure out
 how to make them work.
 
 Thanks,
 
 Christian
 
 
 
 -- 
 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] links into DB

2002-09-10 Thread Jacob Miller

I don't think its possible to make a normal link open the default email as 
mailto: is a special trigger built into the browsers.  The only way I can 
think of would be using javascript in the page.. something like

body onLoad=document.location='mailto:[EMAIL PROTECTED]';
/body

- jacob

At 18:51 09/10/2002, Juan Pablo Aqueveque wrote:
Hi all,

I want to do this:
When somebody do click in this url : 
http://somehost.somedomain/mailtolinks.php?id=45
the script 'mailtolinks.php' should open my e-mail client (like 
mailto:[EMAIL PROTECTED] sentence)

Any idea?
thanks


Juan Pablo Aqueveque [EMAIL PROTECTED]
Ingeniero de Sistemas
Departamento de Redes y Comunicaciones http://www.drc.uct.cl
Universidad Católica de Temuco.
Tel:(5645) 205 630 Fax:(5645) 205 628


--
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] links into DB

2002-09-10 Thread Juan Pablo Aqueveque

Oh yeah ...I thought this same, I simply wanted to know if somebody could 
give a better solution.

Thank you for your quick answer Jacob!..

greetings!,

--jp

At 00:55 11-09-2002 +0800, Jacob Miller wrote:
I don't think its possible to make a normal link open the default email as 
mailto: is a special trigger built into the browsers.  The only way I can 
think of would be using javascript in the page.. something like

body onLoad=document.location='mailto:[EMAIL PROTECTED]';
/body

- jacob

At 18:51 09/10/2002, Juan Pablo Aqueveque wrote:
Hi all,

I want to do this:
When somebody do click in this url : 
http://somehost.somedomain/mailtolinks.php?id=45
the script 'mailtolinks.php' should open my e-mail client (like 
mailto:[EMAIL PROTECTED] sentence)

Any idea?
thanks


Juan Pablo Aqueveque [EMAIL PROTECTED]
Ingeniero de Sistemas
Departamento de Redes y Comunicaciones http://www.drc.uct.cl
Universidad Católica de Temuco.
Tel:(5645) 205 630 Fax:(5645) 205 628


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


Juan Pablo Aqueveque [EMAIL PROTECTED]
Ingeniero de Sistemas
Departamento de Redes y Comunicaciones http://www.drc.uct.cl
Universidad Católica de Temuco.
Tel:(5645) 205 630 Fax:(5645) 205 628


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




Re: [PHP] links into DB

2002-09-10 Thread Kevin Stone

It's a GET request right?  So it'll be just like any other Location header.
mailtolinks.php will contain..

?
extract($_GET);
// get email $addy that corresponds to $id. //
header(Location: mailto:$addy;);
?

-Kevin

- Original Message -
From: Juan Pablo Aqueveque [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 4:51 AM
Subject: [PHP] links into DB


 Hi all,

 I want to do this:
 When somebody do click in this url :
 http://somehost.somedomain/mailtolinks.php?id=45
 the script 'mailtolinks.php' should open my e-mail client (like
 mailto:[EMAIL PROTECTED] sentence)

 Any idea?
 thanks

 
 Juan Pablo Aqueveque [EMAIL PROTECTED]
 Ingeniero de Sistemas
 Departamento de Redes y Comunicaciones http://www.drc.uct.cl
 Universidad Católica de Temuco.
 Tel:(5645) 205 630 Fax:(5645) 205 628


 --
 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] links

2002-03-17 Thread mnc

On Sun, 17 Mar 2002, Morten Nielsen wrote:
 I got a table where I on the left has a link to page1. Another place in the
 table I have a button, which also links to page1. Is it possible to tell
 which of the two links has been pressed.
 I need to know so I only show a specific message when the button has been
 pressed.

The link:

   a href=page1.html?which=1

The button:

   a href=page1.html?which=2

page1.html:

   ? print they clicked link number {$HTTP_GET_VARS['which']}; ?

miguel


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




RE: [PHP] links manager

2002-02-14 Thread Matt Schroebel

Look here:
http://www.zend.com/apps.php?CID=38

-Original Message-
From: Administration@myclassguide [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 14, 2002 5:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] links manager


Hi 

Anybody know of any good scripts for creating a directory for links which includes a 
search function similar to Yahoo and other search engines.

Thanks in advance

Mohamed


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




Re: [PHP] Links

2001-09-05 Thread * RzE:

Original message
From: Kunal Jhunjhunwala [EMAIL PROTECTED]
Date: Wed, Sep 05, 2001 at 03:49:49PM +0530
Message-ID: 056a01c135f4$4e7b99a0$0301a8c0@CONFUSED
Subject: [PHP] Links

 Hey,
 This is the second time I am asking about this. I havent been able to solve
 the problem. I am trying to get all the information between the a /a
 tags. How can i do this? I couldnt figure the regex out :(
 Regards,
 Kunal Jhunjhunwala

/Original message

Reply

Here you are!

This regex gets you everything between all A and /A tags. Case
insensitive, including embedded HTML-tags etc. Try it and let me
know if this is what you need.

--- PHP code ---
preg_match_all (/a[^]*(.+)\/a/imU, $StringToSearch, $matches);
print_r ($matches);
--- End of PHP code ---

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General 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] Links

2001-09-05 Thread Brian Clark

@ 6:42:33 AM on 9/5/01, * RzE: wrote:

 This regex gets you everything between all A and /A tags. Case
 insensitive, including embedded HTML-tags etc. Try it and let me
 know if this is what you need.

 --- PHP code ---
 preg_match_all (/a[^]*(.+)\/a/imU, $StringToSearch, $matches);
 print_r ($matches);
 --- End of PHP code ---

Another option would be to use Snoopy's fetchlinks():

http://snoopy.sourceforge.net/

It's not perfect though..

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.


-- 
PHP General 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] Links as a query point instead of form drop down box

2001-05-17 Thread James Holloway

Hi Laurie,

If the data to be displayed was in a database, and each row of data
corresponded to an auto incrementing id, you could reference by id number,
which is a much better way of doing things via the GET method than messing
around with long names.  Assuming that you have two tables, one that
contains the categories (with its own unique id, adn one which contains the
elements of each category):

table categories:
idcategory
1Apples
2Pears
3Oranges

table contents:
idcat_idnamecontents
11Green applesetc etc
21Red Apples   etc etc
31Exotic applesetc


Then the contents page:

?

$connection = //Connection details.
$get_categories = @mysql_query(SELECT * FROM categories ORDER BY category
DESC, $connection)
or die (mysql_error());

while($row = mysql_fetch_array($get_categories)) {
$id = $row['id'];
$category = $row['category'];

echo a href=\category.php?id= . $id . \ .
stripslashes(htmlentities($category)) . /a;

}

?

The category page, where all the fruits are held:

?


$connection = //Connection details.
$get_contents = @mysql_query(SELECT * FROM contents WHERE cat_id = '$id'
ORDER BY name DESC, $connection)
or die (mysql_error());

while($row = mysql_fetch_array($get_contents)) {
$id = $row['id'];
$name = $row['name'];
$contents = $row['contents'];

echo stripslashes(htmlentities($name)) . BRBR;
echo stripslashes(htmlentities($contents));

}

?

Or you could combine the both:

?

$connection = //Connection details.
$get_categories = @mysql_query(SELECT * FROM categories ORDER BY category
DESC, $connection)
or die (mysql_error());

while($row = mysql_fetch_array($get_categories)) {
$id = $row['id'];
$category = $row['category'];

echo a href=\category.php?id= . $id . \ .
stripslashes(htmlentities($category)) . /a;
echo UL;

$get_contents = @mysql_query(SELECT * FROM contents WHERE cat_id =
'$id' ORDER BY name DESC, $connection)
or die (mysql_error());

while($row = mysql_fetch_array($get_contents)) {
$name = $row['name'];
$contents = $row['contents'];

 echo LI . stripslashes(htmlentities($name)) . BRBR;
 echo LI . stripslashes(htmlentities($contents));

}

echo /UL;

}

?

The last example would give you something like:

Apples:
Green apples

Green apples are greener than green.

Red Apples

Red apples are redder than red.

Exotic apples

Are,  Exotic.

Pears:
Etc

Of course, that won't look too pretty, but I leave the layout to you.  Have
a play, see how you get on :)

James.

Laurie Landry [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I understand how to use a dropdown box to make your selection in which
that
 selection is the criteria to display a database content; but I was
wondering
 how I can achieve a query by link.

 For example, if you went to index.html file where there is a php coding
that
 generates the categories available (arrays) and outputs:

 a href=showdata.phpApples/a
 a href=showdata.phpOranges/a
 a href=showdata.phpBananas/a

 If you click on apples, it will send a query to the database to show all
 listings under the category apples. (SELECT category FROM FRUITS WHERE
 category=apples)

 how would I add the query criteria to the link? and how would I set up
 showdata to take the information from the selected link?

 thanks in advance,

 Laurie M. Landry
 lmlweb Design  Development

 www.lmlweb.com
 [EMAIL PROTECTED]

 T: (604) 872-6915
 F: (425) 732-1547


 --
 PHP General 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 General 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] Links as a query point instead of form drop down box

2001-05-16 Thread Jason Murray

 how would I add the query criteria to the link? and how would I set up
 showdata to take the information from the selected link?

Where you would usually have a form such as:

FORM ACTION='destination.php'
SELECT NAME='name'
 OPTION VALUE='value' Display Value /OPTION
/SELECT
/FORM

... to use it as a link, you would use:

A HREF='destination.php?name=value' Display Value /A

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
What'll Scorpy use wormhole technology for?
'Faster pizza delivery.'

-- 
PHP General 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] Links

2001-04-28 Thread Taylor, Stewart

How about something like.

'start_page.php'
Some HTML...
A HREF=index.php?action=displayScreen1display screen 1/A
A HREF=index.php?action=displayScreen2display screen 2/A
More HTML...

'index.php'
?php
Some Code
switch($action)
{
  case displayScreen1:
  {
 include_once displayScreen1.php;
 break;
  }
  case displayScreen2:
  {
 include_once displayScreen2.php;
 break;
  }
  default:
  {
 include_once start_page.php;
 break;
  }
}
Some More Code
?




-Original Message-
From: Ben Quinn [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 11:57
To: [EMAIL PROTECTED]
Subject: [PHP] Links


Hi all,

I've been trying for many hours to find information on this, but not having
much luck.  What i want to do is have an index.php page, and then each link
on that page has a URL like index.php?linkidie.  index.php?links  etc

Can anyone point me in the right direction?




-- 
PHP General 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 General 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]