Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 I apologize for my ignorance, I don't really know much about
 javascript. When I add all that into my form page, when I submit the
 form, it just replaces the page I was on with the form results, rather
 than in the new frame page. I'm assuming I need to put the url for the
 frameset page in that code somewhere. Where does it go? And, which
 part do I replace with the frame name on that frameset page?

 Thank you for taking the time to help me with this, I really appreciate it!



Let's look at the code:

//var1 and var2 are the search criteria the user entered in your search
form(You may have more or less)
function submitForm(var1,var2) {

//top.leftFrame is how you set the focus to the frame you want.  leftFrame
could be different on your system...whatever you named the frame.

//top.leftFrame.document.my_search.text1.value=var1 assumes the form name in
the frame you want data in is named
//my_search and it givs the text object text1 the value of var1 from your
search form
top.leftFrame.document.my_search.text1.value = var1;

//top.leftFrame.document.my_search.text2.value=var2 assumes the form name in
the frame you want data in is named
//my_search and it givs the text object text1 the value of var2 from your
search form
 top.leftFrame.document.my_search.text2.value = var2;

//top.leftFrame.document.my_search.submit() will submit the form in your
target frame then you can use the $_POST values throughout the frame
 top.leftFrame.document.my_search.submit();

//document.search_form.submit() will submit your search page. I use this so
I can reuse the $_POST values to display the search criteria after submit.
 document.search_form.submit();
}


Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 7:33 AM, Dan Shirah wrote:


I apologize for my ignorance, I don't really know much about
javascript. When I add all that into my form page, when I submit the
form, it just replaces the page I was on with the form results, rather
than in the new frame page. I'm assuming I need to put the url for the
frameset page in that code somewhere. Where does it go? And, which
part do I replace with the frame name on that frameset page?

Thank you for taking the time to help me with this, I really  
appreciate it!



Let's look at the code:

//var1 and var2 are the search criteria the user entered in your  
search form(You may have more or less)

function submitForm(var1,var2) {

//top.leftFrame is how you set the focus to the frame you want.   
leftFrame could be different on your system...whatever you named the  
frame.


//top.leftFrame.document.my_search.text1.value=var1 assumes the form  
name in the frame you want data in is named
//my_search and it givs the text object text1 the value of var1 from  
your search form

top.leftFrame.document.my_search.text1.value = var1;

//top.leftFrame.document.my_search.text2.value=var2 assumes the form  
name in the frame you want data in is named
//my_search and it givs the text object text1 the value of var2 from  
your search form

 top.leftFrame.document.my_search.text2.value = var2;

//top.leftFrame.document.my_search.submit() will submit the form in  
your target frame then you can use the $_POST values throughout the  
frame

 top.leftFrame.document.my_search.submit();

//document.search_form.submit() will submit your search page. I use  
this so I can reuse the $_POST values to display the search criteria  
after submit.

 document.search_form.submit();
}




In the head of my page, I have this:

script type=text/javascript
function submitForm(var1,var2) {
 top.mainFrame.document.my_search.text1.value = var1;
 top.mainFrame.document.my_search.text2.value = var2;
 top.mainFrame.document.my_search.submit();
 document.search_form.submit();
}
/script

Then, for the form code I have this:

form name=search_form method=post action=http://webcat.winnefox.org/web2/tramp2.exe/do_keyword_search/guest 
 id=qpl

input type=hidden name=SETTING_KEY value=Menasha /
input type=hidden name=index value=default /
input TYPE=hidden NAME=hitlist_screen VALUE=hitlist.html /
input TYPE=hidden NAME=record_screen VALUE=Record.html /
input type=hidden name=query_screen value=home.html /
input type=hidden name=servers value=1home /
	Find library books, music, movies and more...input  
class=searchbartextfield id=query name=query type=text  	a  
href 
= 
javascript:submitForm 
(document 
.search_form.var1.value,document.search_form.var2.value)SEARCH/ 
anbsp;a id=topNav_advanced_search href=/sites/ 
beta.menashalibrary.org/themes/salamander/searchframe.htmlAdvanced  
Search/a

/form

If I type in a word in the search box http://beta.menashalibrary.org/about 
 and hit enter, it searches the catalog just fine, but then just  
replaces the current page with the search results. If I click on the  
SEARCH link with the javascript, it does nothing.


I want the results to go to this url: 
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
in the frame name of mainFrame. I'm thinking that address needs to go  
in the javascript somewhere so it knows where to go, but where? Does  
the rest of the code look ok?


Thanks again for taking the time to help me with this.

- jody

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



Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 In the head of my page, I have this:

 script type=text/javascript
 function submitForm(var1,var2) {
  top.mainFrame.document.my_search.text1.value = var1;
  top.mainFrame.document.my_search.text2.value = var2;
  top.mainFrame.document.my_search.submit();
  document.search_form.submit();
 }
 /script

 If I type in a word in the search box http://beta.menashalibrary.org/about and
 hit enter, it searches the catalog just fine, but then just replaces the
 current page with the search results. If I click on the SEARCH link with the
 javascript, it does nothing.



It looks like you haven't adapted the example I gave you to conform to your
page/form structure.

top.mainFrame.document.my_search.text1.value = var1;

The frame you are populating may not be named mainFrame
The form in your destination frame may not be named my_search
The input in you destination frame may not be text1

You have to modify these areas to suit your application and add or remove
more as needed.


Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 11:32 AM, Dan Shirah wrote:


In the head of my page, I have this:

script type=text/javascript
function submitForm(var1,var2) {
 top.mainFrame.document.my_search.text1.value = var1;
 top.mainFrame.document.my_search.text2.value = var2;
 top.mainFrame.document.my_search.submit();
 document.search_form.submit();
}
/script

If I type in a word in the search box http://beta.menashalibrary.org/about 
 and hit enter, it searches the catalog just fine, but then just  
replaces the current page with the search results. If I click on the  
SEARCH link with the javascript, it does nothing.



It looks like you haven't adapted the example I gave you to conform  
to your page/form structure.


top.mainFrame.document.my_search.text1.value = var1;

The frame you are populating may not be named mainFrame
The form in your destination frame may not be named my_search
The input in you destination frame may not be text1

You have to modify these areas to suit your application and add or  
remove more as needed.


So, I had this all wrong before. Basically, I need two forms, right?  
One on my originating page, and one on the page within the frameset I  
want to pass the values to. Correct?


My form, which I named my_search has one input field, which I named  
query. In the javascript, I put in this:


script type=text/javascript
function submitForm(var1,var2) {
 top.mainFrame.document.my_search.query.value = var1;
 top.mainFrame.document.my_search.submit();
 document.search_form.submit();
}
/script

In the framset named mainFrame, I have a page which matches the form  
on the originating page.


Am I on the right track? When I click on the search link, nothing  
happens.


- jody

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



Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

  So, I had this all wrong before. Basically, I need two forms, right? One
 on my originating page, and one on the page within the frameset I want to
 pass the values to. Correct?

 My form, which I named my_search has one input field, which I named query.
 In the javascript, I put in this:

 script type=text/javascript
 function submitForm(var1,var2) {
  top.mainFrame.document.my_search.query.value = var1;
  top.mainFrame.document.my_search.submit();
  document.search_form.submit();
 }
 /script

 In the framset named mainFrame, I have a page which matches the form on
 the originating page.

 Am I on the right track? When I click on the search link, nothing happens.


mainFrame should not be the name of your frameset.  Say I have a frameset
with three sections. Top, Left, and Right...you will actually have 4 pages.

Frameset.php //The top level of the frameset that doesn't do much more than
assign the Frame names and pages associated with them
TopSection.php //Anything on this page will be displayed in your top frame
LeftSection.php // Anything on this page will be displayed in your left
frame
RightSection.php //Anything on this page will be displayed in your right
frame

In order to see the names assigned to your different frames you need to open
Frameset.php and look for them.

It will look something like this:

frameset rows=200,* cols=* framespacing=0 frameborder=NO
border=1
  frame src=TopSection.php name=topFrame scrolling=NO noresize 
  frame src=LeftSection.php name=leftFrame
  frame src=RightSection.php name=rightFrame
/frameset

You should never need to reference Framset.php directly.

Say I wanted to pass a value from TopSection.php to a text field in
LeftSection.php I would do this:

TopSection.php
form name=search_form method=post action=?php echo
$_SERVER['PHP_SELF']; ?
input type=text name=search_name value= //The default value will be
blank but will change if someone enters in text.
/form

//Now the persons submits the form and you want the search name to populate
to your other frame.
a
href=javascript:submitForm(document.search_form.search_name.value)SEARCH/a

//The Javascript function this calls will pass the
document.search_form.search_name.value to the new form
function submitForm(name) {
 top.leftFrame.document.my_search.search_name.value = name;
 document.search_form.submit();
}
//top goes to the highest level of your frameset, leftFrame is the frame
name specified for LeftSection.php on your Frameset.php page,
document.my_search is the name of your form in
//LeftSection.php, search_name is the name of your text field within the
form in LeftSection.php

//Your TopSection.php form has now passed the search_name value to the
LeftSection.php page

LeftSection.php
form name=my_search method=post action=
input type=text name=search_name value=
/form

That should be enough to get you going.  If you have any further questions
lets take this Off List since it does not relate to PHP.

Dan


[PHP] Passing variable to a page in a frameset

2008-08-14 Thread Jody Cleveland

Hello,

I've got a website here: http://beta.menashalibrary.org/about

On every page, i've got a search box at the top. This search box  
searches the library's web catalog. The problem is, when someone  
searches, it takes them away from the site. What I'd like to do is  
take what a person searches for, and load it into the bottom frame of  
this page:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

Is there a way, with php, to take what someone puts in the search box  
and put the results into the bottom frame of a frameset when the  
originating page does not contain frames?


- jody

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



Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread Bastien Koert
On Thu, Aug 14, 2008 at 4:34 PM, Jody Cleveland [EMAIL PROTECTED]wrote:

 Hello,

 I've got a website here: http://beta.menashalibrary.org/about

 On every page, i've got a search box at the top. This search box searches
 the library's web catalog. The problem is, when someone searches, it takes
 them away from the site. What I'd like to do is take what a person searches
 for, and load it into the bottom frame of this page:

 http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

 Is there a way, with php, to take what someone puts in the search box and
 put the results into the bottom frame of a frameset when the originating
 page does not contain frames?

 - jody

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


This is more a javascript / html

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread Dan Shirah

  Hello,
 
  I've got a website here: http://beta.menashalibrary.org/about
 
  On every page, i've got a search box at the top. This search box searches
  the library's web catalog. The problem is, when someone searches, it
 takes
  them away from the site. What I'd like to do is take what a person
 searches
  for, and load it into the bottom frame of this page:
 
 
 http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
 
  Is there a way, with php, to take what someone puts in the search box and
  put the results into the bottom frame of a frameset when the originating
  page does not contain frames?
 
  - jody


Bastien is right, this is more of a Javascript issue.

It can be accomplished very easily by doing the following.

Once the user enters the search criteria have the submit button/link call a
javascript function like the following:

function submitForm(var1,var2) {
 top.leftFrame.document.my_search.text1.value = var1;
 top.leftFrame.document.my_search.text2.value = var2;
 top.leftFrame.document.my_search.submit();
 document.search_form.submit();
}

And this would be your submit link:

a
href=javascript:submitForm(document.search_form.var1.value,document.search_form.var2.value)SEARCH/a


Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread Stut

On 14 Aug 2008, at 21:34, Jody Cleveland wrote:

I've got a website here: http://beta.menashalibrary.org/about

On every page, i've got a search box at the top. This search box  
searches the library's web catalog. The problem is, when someone  
searches, it takes them away from the site. What I'd like to do is  
take what a person searches for, and load it into the bottom frame  
of this page:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

Is there a way, with php, to take what someone puts in the search  
box and put the results into the bottom frame of a frameset when the  
originating page does not contain frames?


Set the target attribute of the search form to the name of the bottom  
frame. The form will then be POSTed in that frame.


-Stut

--
http://stut.net/

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



Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread george
On Thu, Aug 14, 2008 at 3:43 PM, Dan Shirah [EMAIL PROTECTED] wrote:
  Hello,
 
  I've got a website here: http://beta.menashalibrary.org/about
 
  On every page, i've got a search box at the top. This search box
  searches
  the library's web catalog. The problem is, when someone searches, it
  takes
  them away from the site. What I'd like to do is take what a person
  searches
  for, and load it into the bottom frame of this page:
 
 
  http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
 
  Is there a way, with php, to take what someone puts in the search box
  and
  put the results into the bottom frame of a frameset when the originating
  page does not contain frames?
 
  - jody

 Bastien is right, this is more of a Javascript issue.

 It can be accomplished very easily by doing the following.

 Once the user enters the search criteria have the submit button/link call a
 javascript function like the following:

 function submitForm(var1,var2) {
  top.leftFrame.document.my_search.text1.value = var1;
  top.leftFrame.document.my_search.text2.value = var2;
  top.leftFrame.document.my_search.submit();
  document.search_form.submit();
 }

 And this would be your submit link:

 a
 href=javascript:submitForm(document.search_form.var1.value,document.search_form.var2.value)SEARCH/a

I apologize for my ignorance, I don't really know much about
javascript. When I add all that into my form page, when I submit the
form, it just replaces the page I was on with the form results, rather
than in the new frame page. I'm assuming I need to put the url for the
frameset page in that code somewhere. Where does it go? And, which
part do I replace with the frame name on that frameset page?

Thank you for taking the time to help me with this, I really appreciate it!

- jody

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



Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread tedd

At 4:06 PM -0500 8/14/08, george wrote:


Thank you for taking the time to help me with this, I really appreciate it!

- jody



Make it easy on yourself and try this:

http://sperling.com/examples/search/

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



[PHP] Passing variable number of parameters by reference

2005-05-12 Thread Robert Meyer
Hello,

Using: PHP Version 5.0.3

I build the following function:

function Set4HTMLOut() {
  $C = func_num_args();
  for ($I = 0; $I  $C; $I++) {
$A = func_get_arg($I);
 echo 'I['.$I.']('.strlen($A).'): '.$A.'br /';
$A = htmlspecialchars($A);
 echo 'I['.$I.']('.strlen($A).'): '.$A.'br /';
  }
}

And called it like this:

 Set4HTMLOut($LName, $LOrg, $LWebSite, $LPhones, $LComments);
 echo 'br /After call:br /'.
 'LName: '.$LName.'br /'.
 'LOrg: '.$LOrg.'br /'.
 'LWebSite: '.$LWebSite.'br /'.
 'LPhones: '.$LPhones.'br /'.
 'LComments: '.$LComments.'br /';

The echo statements in the Set4HTMLOut() function echos all the correct 
data and proves the data was received correctly then altered by the 
htmlspecialchars() function appropriately.  Notice that the caller passes 
each variable as a reference.  Yet, the echo statement after the call 
displays the data without any changes, like the first echo statement in 
the Set$HTMLOut() function does.

Is it not possible to pass variables by reference to a variable-length 
parameter list?  Or am I doing something wrong?  If so, what?

I have already built a work around.  I do not need any work arounds.  I just 
think one should be able to pass variables by reference to a function that 
accepts a variable-length parameter list.

Regards

Robert

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



Re: [PHP] Passing variable number of parameters by reference

2005-05-12 Thread Marek Kilimajer
I believe it's mentioned somewhere in the manual you can't do that. 
func_get_arg() always return a copy. You can workaround this using an array.

Robert Meyer wrote:
Hello,
Using: PHP Version 5.0.3
I build the following function:
function Set4HTMLOut() {
  $C = func_num_args();
  for ($I = 0; $I  $C; $I++) {
$A = func_get_arg($I);
 echo 'I['.$I.']('.strlen($A).'): '.$A.'br /';
$A = htmlspecialchars($A);
 echo 'I['.$I.']('.strlen($A).'): '.$A.'br /';
  }
}
And called it like this:
 Set4HTMLOut($LName, $LOrg, $LWebSite, $LPhones, $LComments);
 echo 'br /After call:br /'.
 'LName: '.$LName.'br /'.
 'LOrg: '.$LOrg.'br /'.
 'LWebSite: '.$LWebSite.'br /'.
 'LPhones: '.$LPhones.'br /'.
 'LComments: '.$LComments.'br /';
The echo statements in the Set4HTMLOut() function echos all the correct 
data and proves the data was received correctly then altered by the 
htmlspecialchars() function appropriately.  Notice that the caller passes 
each variable as a reference.  Yet, the echo statement after the call 
displays the data without any changes, like the first echo statement in 
the Set$HTMLOut() function does.

Is it not possible to pass variables by reference to a variable-length 
parameter list?  Or am I doing something wrong?  If so, what?

I have already built a work around.  I do not need any work arounds.  I just 
think one should be able to pass variables by reference to a function that 
accepts a variable-length parameter list.

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


[PHP] Passing variable on include

2004-08-29 Thread Xongoo!com: Central unit
Hi,

I have to pass variable on include
include(includes/include.php);

include(includes/include.php?name=$name);
wouldn't work.

How do I do that? Cokies are not an option, btw.

--
Tadas Talaikis
[EMAIL PROTECTED]
http://www.xongoo.com

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



Re: [PHP] Passing variable on include

2004-08-29 Thread Marek Kilimajer
Xongoo!com: Central unit wrote:
Hi,
I have to pass variable on include
include(includes/include.php);
include(includes/include.php?name=$name);
wouldn't work.
How do I do that? Cokies are not an option, btw.
Code in includes/include.php is executed in the scope of the including 
file, so all variables available at the include() will be available in 
the included file. Thus the solution is:

$name = 'Your Name';
include(includes/include.php);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Passing variable on include

2004-08-29 Thread Xongoo!com: Central unit
Duh, really, and just read on varianle scopes on
php.net. Gotta to sleep for some time :)

--
Tadas Talaikis
[EMAIL PROTECTED]
http://www.xongoo.com
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Xongoo!com: Central unit [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, August 29, 2004 11:41 AM
Subject: Re: [PHP] Passing variable on include


 Xongoo!com: Central unit wrote:
  Hi,
 
  I have to pass variable on include
  include(includes/include.php);
 
  include(includes/include.php?name=$name);
  wouldn't work.
 
  How do I do that? Cokies are not an option,
btw.

 Code in includes/include.php is executed in the
scope of the including
 file, so all variables available at the
include() will be available in
 the included file. Thus the solution is:

 $name = 'Your Name';
 include(includes/include.php);

 --
 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] Passing variable from webpage to php (newbie?)

2003-03-20 Thread Bobby Rahman
Hiya

It could need setting register_globals =on in your php.ini

if after that still problems then you may need to look into sessions and in 
particular session_start() and $_SESSION['varname'] and make sure the 
variables are global so that more than one script can use them.

Hope this steers you in right direction
*warning im a newbie too so you may wait for some more replies to confirm 
what im saying*

Bobster











From: Joe Kupiszewski [EMAIL PROTECTED]
Reply-To: Joe Kupiszewski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Passing variable from webpage to php (newbie?)
Date: Wed, 19 Mar 2003 10:57:11 -0500
I think I already tried to post once, so sorry if this is a duplicate, but 
I
don't see my first attempt.  I am trying to do what should be a relatively
simple and basic task.  I've got a php script/page that has a switch/case
selection statement in it.  Obviously, depending on what value a particular
variable takes when passed to the script, the script SHOULD :) do different
things.  However, when I invoke the script using
www.somedomain.com/somephpscript.php?action=1  (substitute one with, 2, 3, 
4
or whatever) and then do a check whether any value is passed to my script,
it always tells me the value is empty ( if (empty ($action)) - it just
always thinks its empty.  I'm copying this script from a book, so I do not
have any reason to believe there is an error in the code, but obviously
something is not happening properly.  My thought is that perhaps something
needs to be turned on in the php.ini or in the apache httpd.conf file to
allow this variable passing to work.  Is there some other way to do this?

Sorry for the long paragraph sentence.  I'll be happy to post the code if
needed or provide any additional information or give the actual URL so you
can see what is happening.
Thanks for any thoughts



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


_
Overloaded with spam? With MSN 8, you can filter it out 
http://join.msn.com/?page=features/junkmailpgmarket=en-gbXAPID=32DI=1059

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


[PHP] Passing variable from webpage to php (newbie?)

2003-03-19 Thread Joe Kupiszewski
I think I already tried to post once, so sorry if this is a duplicate, but I
don't see my first attempt.  I am trying to do what should be a relatively
simple and basic task.  I've got a php script/page that has a switch/case
selection statement in it.  Obviously, depending on what value a particular
variable takes when passed to the script, the script SHOULD :) do different
things.  However, when I invoke the script using
www.somedomain.com/somephpscript.php?action=1  (substitute one with, 2, 3, 4
or whatever) and then do a check whether any value is passed to my script,
it always tells me the value is empty ( if (empty ($action)) - it just
always thinks its empty.  I'm copying this script from a book, so I do not
have any reason to believe there is an error in the code, but obviously
something is not happening properly.  My thought is that perhaps something
needs to be turned on in the php.ini or in the apache httpd.conf file to
allow this variable passing to work.  Is there some other way to do this?

Sorry for the long paragraph sentence.  I'll be happy to post the code if
needed or provide any additional information or give the actual URL so you
can see what is happening.

Thanks for any thoughts



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



[PHP] passing variable question

2002-11-11 Thread Ron Clark
Hello all,

I have a php script that reads all the files in a directory (pictures), the
outputs each picture as a link to be displayed in the main frame of the html
page. All of that works fine. I want to be able to pretty up the picture
out put by placing the picture into a html table so it is centered, add
color, etc. But I cannot seem to figure out how to pass the variable from
the menu page to the main frame page without using a goofy gray button form.
Anyone know how to pass a variable on just a link alone?

Thanks,
Ronnie



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




Re: [PHP] passing variable question

2002-11-11 Thread Marco Tabini
You just need to add a question mark, the name of the variable, an equal
sign and its value (properly encoded):

echo 'a href=myurl?myvalue=' . urlencode ($value) . '';

In the receiving script, you can read the value using $_GET['myvalue'];

Hope this helps!


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

---BeginMessage---
Hello all,

I have a php script that reads all the files in a directory (pictures), the
outputs each picture as a link to be displayed in the main frame of the html
page. All of that works fine. I want to be able to pretty up the picture
out put by placing the picture into a html table so it is centered, add
color, etc. But I cannot seem to figure out how to pass the variable from
the menu page to the main frame page without using a goofy gray button form.
Anyone know how to pass a variable on just a link alone?

Thanks,
Ronnie



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



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


Re: [PHP] passing variable question

2002-11-11 Thread John Nichel
Pass if via the URL

a href=yourlink.php?picture_data=whateverLink/a

On the display page, access the data you passed by...

$_GET['picture_data']

Do a google search for get query.

Ron Clark wrote:

Hello all,

I have a php script that reads all the files in a directory (pictures), the
outputs each picture as a link to be displayed in the main frame of the html
page. All of that works fine. I want to be able to pretty up the picture
out put by placing the picture into a html table so it is centered, add
color, etc. But I cannot seem to figure out how to pass the variable from
the menu page to the main frame page without using a goofy gray button form.
Anyone know how to pass a variable on just a link alone?

Thanks,
Ronnie






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


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




[PHP] passing variable via url ( newbye question)

2002-07-30 Thread Saci

I can pass one variable using the url on this way

http://myadress/php/mypage.php?modo=123

and to read i have the code

echo $_GET['modo'].BR;

That's work fine on 4.21

How can I pass  and read 3 variables instead of one ?

I nedd to pass
 mode = 123
color= red
size=3

 using the url

I tried
http://myadress/php/mypage.php?modo=123color=redsize=3

and to get

echo $_GET['modo'].BR;
echo $_GET['color'].BR;
echo $_GET['size'].BR;

but does not work

How can i do that





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




Re: [PHP] passing variable via url ( newbye question)

2002-07-30 Thread Martin Clifford

http://myaddress/php/mypage.php?modo=123color=redsize=3 

Just separate name/value pairs with ampersand ().

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Saci [EMAIL PROTECTED] 07/30/02 04:09PM 
I can pass one variable using the url on this way

http://myadress/php/mypage.php?modo=123 

and to read i have the code

echo $_GET['modo'].BR;

That's work fine on 4.21

How can I pass  and read 3 variables instead of one ?

I nedd to pass
 mode = 123
color= red
size=3

 using the url

I tried
http://myadress/php/mypage.php?modo=123color=redsize=3 

and to get

echo $_GET['modo'].BR;
echo $_GET['color'].BR;
echo $_GET['size'].BR;

but does not work

How can i do that





-- 
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] passing variable via url ( newbye question)

2002-07-30 Thread cteubner

You are passing the variables correctly.  If that's your actual code

echo $_GET['modo'].BR;
echo $_GET['color'].BR;
echo $_GET['size'].BR;

then you need br (note the closing  ) - PHP is doing what you told it, and your 
browser is confused by the output.  If PHP were the problem you'd probably see an 
error message.
Also, upgrade to 4.2.2 please :)
Regards,
Colin Teubner

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




RE: [PHP] passing variable via url ( newbye question)

2002-07-30 Thread Martin Towell

Is this a direct copy from your code?
 echo $_GET['modo'].BR;
 echo $_GET['color'].BR;
 echo $_GET['size'].BR;
if so, you'll need to close the br tags

see if that helps
Martin


-Original Message-
From: Saci [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 6:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] passing variable via url ( newbye question)


I can pass one variable using the url on this way

http://myadress/php/mypage.php?modo=123

and to read i have the code

echo $_GET['modo'].BR;

That's work fine on 4.21

How can I pass  and read 3 variables instead of one ?

I nedd to pass
 mode = 123
color= red
size=3

 using the url

I tried
http://myadress/php/mypage.php?modo=123color=redsize=3

and to get

echo $_GET['modo'].BR;
echo $_GET['color'].BR;
echo $_GET['size'].BR;

but does not work

How can i do that





-- 
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] passing variable arguments from select

2002-06-27 Thread Haddad Said

I still cant get it right,

in query.php i have this piece of code;

echo form action='test2.php' action='post'
select name='language'
option value='0'selected='yes'one/option
option value='1'two/option
/select
input type=text name=query
input type=submit name=submit
/form;

and in test2.php i have this;

if ($_POST['language'] = 1)
{$lang = EngP=1;}
else {$lang = EngP=0;}
echo $lang ;

But it always echoes EngP=1 no matter what I choose, what is wrong here??



Erik Price [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 On Wednesday, June 26, 2002, at 02:51  PM, Haddad Said wrote:

  Hi, i am having a problem passing variables from a drop down menu in a
  form;
 
  from action=test.php action=post
  select name=example
  option selected one/option
  option two/option
  /form

 You should do it like this (be sure to properly quote your attributes,
 and use the 'value' attribute of the 'option' tag):

 print form action='test.php' method='post'
 select name='example'
 option selected='yes' value='1'One/option
 option value='2'Two/option
 /select
   /form\n;

 In the test.php page, the selected value will be found in the
 $_POST['example'] variable.


 Erik





 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]




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




Re: [PHP] passing variable arguments from select

2002-06-27 Thread Mark Heintz PHP Mailing Lists

On Thu, 27 Jun 2002, Haddad Said wrote:

 in query.php i have this piece of code;

 echo form action='test2.php' action='post'
 select name='language'
 option value='0'selected='yes'one/option
 option value='1'two/option
 /select
 input type=text name=query
 input type=submit name=submit
 /form;

 and in test2.php i have this;

 if ($_POST['language'] = 1)
 {$lang = EngP=1;}
 else {$lang = EngP=0;}
 echo $lang ;

 But it always echoes EngP=1 no matter what I choose, what is wrong here??


if ($_POST['language'] == 1)


You have an assignment operator instead of a comparison in your if
statement.

mh.


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




Re: [PHP] passing variable arguments from select

2002-06-27 Thread Haddad Said

Yes I changed that, but now it always echoes EngP=0

Mark Heintz Php Mailing Lists [EMAIL PROTECTED] wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Thu, 27 Jun 2002, Haddad Said wrote:

  in query.php i have this piece of code;
 
  echo form action='test2.php' action='post'
  select name='language'
  option value='0'selected='yes'one/option
  option value='1'two/option
  /select
  input type=text name=query
  input type=submit name=submit
  /form;
 
  and in test2.php i have this;
 
  if ($_POST['language'] = 1)
  {$lang = EngP=1;}
  else {$lang = EngP=0;}
  echo $lang ;
 
  But it always echoes EngP=1 no matter what I choose, what is wrong
here??


 if ($_POST['language'] == 1)


 You have an assignment operator instead of a comparison in your if
 statement.

 mh.




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




Re: [PHP] passing variable arguments from select

2002-06-27 Thread Haddad Said

I just found out the $_POST['language'] is always assigned the value Array.
Since a user must choose either of the options and not both, I would rather
do this without arrays, is there another way?


Haddad Said [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Yes I changed that, but now it always echoes EngP=0

 Mark Heintz Php Mailing Lists [EMAIL PROTECTED] wrote in
 message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  On Thu, 27 Jun 2002, Haddad Said wrote:
 
   in query.php i have this piece of code;
  
   echo form action='test2.php' action='post'
   select name='language'
   option value='0'selected='yes'one/option
   option value='1'two/option
   /select
   input type=text name=query
   input type=submit name=submit
   /form;
  
   and in test2.php i have this;
  
   if ($_POST['language'] = 1)
   {$lang = EngP=1;}
   else {$lang = EngP=0;}
   echo $lang ;
  
   But it always echoes EngP=1 no matter what I choose, what is wrong
 here??
 
 
  if ($_POST['language'] == 1)
 
 
  You have an assignment operator instead of a comparison in your if
  statement.
 
  mh.
 





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




[PHP] passing variable arguments from select

2002-06-26 Thread Haddad Said

Hi, i am having a problem passing variables from a drop down menu in a form;

from action=test.php action=post
select name=example
option selected one/option
option two/option
/form

So how will the values of $example be assigned in test.php?

THanks



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




Re: [PHP] passing variable arguments from select

2002-06-26 Thread Erik Price


On Wednesday, June 26, 2002, at 02:51  PM, Haddad Said wrote:

 Hi, i am having a problem passing variables from a drop down menu in a 
 form;

 from action=test.php action=post
 select name=example
 option selected one/option
 option two/option
 /form

You should do it like this (be sure to properly quote your attributes, 
and use the 'value' attribute of the 'option' tag):

print form action='test.php' method='post'
select name='example'
option selected='yes' value='1'One/option
option value='2'Two/option
/select
  /form\n;

In the test.php page, the selected value will be found in the 
$_POST['example'] variable.


Erik







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Igor Portnoy

Hello,

 

I am passing a variable to the new page, when user clicks on the link.
Something like that:

a href=showimage.php?ID=38img src=/some/image.jpg/a

 

How can I extract all other information out of my database for that ID
in the next page (showimage.php)?

 

Thanks

 




Re: [PHP] Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread 1LT John W. Holmes

SELECT * FROM table WHERE ID = $_GET['ID']

Then create a page to display all of that information. Look at the mysql
functions and learn some PHP. We can't help you without knowing what's in
your table and how you want it displayed, etc...

So keep learning and reading and you'll figure out how to do it. Your
question is way to broad for any help...

---John Holmes...

- Original Message -
From: Igor Portnoy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 2:40 PM
Subject: [PHP] Passing variable to new page and pulling the rest of info
from database


Hello,



I am passing a variable to the new page, when user clicks on the link.
Something like that:

a href=showimage.php?ID=38img src=/some/image.jpg/a



How can I extract all other information out of my database for that ID
in the next page (showimage.php)?



Thanks






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




RE: [PHP] Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Scott Hurring

Ahhh! quote that ID number before using it in a query!  :)

// for mysql
mysql_quote($_GET['ID']);

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 05, 2002 4:29 PM
 To: Igor Portnoy; [EMAIL PROTECTED]
 Subject: Re: [PHP] Passing variable to new page and pulling 
 the rest of
 info from database
 
 
 SELECT * FROM table WHERE ID = $_GET['ID']
 
 Then create a page to display all of that information. Look 
 at the mysql
 functions and learn some PHP. We can't help you without 
 knowing what's in
 your table and how you want it displayed, etc...
 
 So keep learning and reading and you'll figure out how to do it. Your
 question is way to broad for any help...
 
 ---John Holmes...
 
 - Original Message -
 From: Igor Portnoy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 05, 2002 2:40 PM
 Subject: [PHP] Passing variable to new page and pulling the 
 rest of info
 from database
 
 
 Hello,
 
 
 
 I am passing a variable to the new page, when user clicks on the link.
 Something like that:
 
 a href=showimage.php?ID=38img src=/some/image.jpg/a
 
 
 
 How can I extract all other information out of my database for that ID
 in the next page (showimage.php)?
 
 
 
 Thanks
 
 
 
 
 
 
 -- 
 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] Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread 1LT John W. Holmes

Or simply just validate it's an integer, like it should be, like you would
do with any user input...

There is no mysql_quote() function...or am I missing something?

---John Holmes...

- Original Message -
From: Scott Hurring [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 4:30 PM
Subject: RE: [PHP] Passing variable to new page and pulling the rest of info
from database


 Ahhh! quote that ID number before using it in a query!  :)

 // for mysql
 mysql_quote($_GET['ID']);

 ---
 Scott Hurring
 Systems Programmer
 EAC Corporation
 [EMAIL PROTECTED]
 Voice: 201-462-2149
 Fax: 201-288-1515

  -Original Message-
  From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 05, 2002 4:29 PM
  To: Igor Portnoy; [EMAIL PROTECTED]
  Subject: Re: [PHP] Passing variable to new page and pulling
  the rest of
  info from database
 
 
  SELECT * FROM table WHERE ID = $_GET['ID']
 
  Then create a page to display all of that information. Look
  at the mysql
  functions and learn some PHP. We can't help you without
  knowing what's in
  your table and how you want it displayed, etc...
 
  So keep learning and reading and you'll figure out how to do it. Your
  question is way to broad for any help...
 
  ---John Holmes...
 
  - Original Message -
  From: Igor Portnoy [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, June 05, 2002 2:40 PM
  Subject: [PHP] Passing variable to new page and pulling the
  rest of info
  from database
 
 
  Hello,
 
 
 
  I am passing a variable to the new page, when user clicks on the link.
  Something like that:
 
  a href=showimage.php?ID=38img src=/some/image.jpg/a
 
 
 
  How can I extract all other information out of my database for that ID
  in the next page (showimage.php)?
 
 
 
  Thanks
 
 
 
 
 
 
  --
  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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Scott Hurring

Sorry, i meant: mysql_escape_string( $value )

I use a class to handle accessing the database, and i
named the function $db-quote(...);  i keep forgetting
that the actual function call that the class is making ;-)

And yes, validating that it's an integer works also,
but even after pregging vars to all hell and back to
verify contents, i still quote.  i'm paranoid. :)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 05, 2002 5:10 PM
 To: Scott Hurring; Php-General (E-mail)
 Subject: Re: [PHP] Passing variable to new page and pulling 
 the rest of
 info from database
 
 
 Or simply just validate it's an integer, like it should be, 
 like you would
 do with any user input...
 
 There is no mysql_quote() function...or am I missing something?
 
 ---John Holmes...
 
 - Original Message -
 From: Scott Hurring [EMAIL PROTECTED]
 To: Php-General (E-mail) [EMAIL PROTECTED]
 Sent: Wednesday, June 05, 2002 4:30 PM
 Subject: RE: [PHP] Passing variable to new page and pulling 
 the rest of info
 from database
 
 
  Ahhh! quote that ID number before using it in a query!  :)
 
  // for mysql
  mysql_quote($_GET['ID']);
 
  ---
  Scott Hurring
  Systems Programmer
  EAC Corporation
  [EMAIL PROTECTED]
  Voice: 201-462-2149
  Fax: 201-288-1515
 
   -Original Message-
   From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 05, 2002 4:29 PM
   To: Igor Portnoy; [EMAIL PROTECTED]
   Subject: Re: [PHP] Passing variable to new page and pulling
   the rest of
   info from database
  
  
   SELECT * FROM table WHERE ID = $_GET['ID']
  
   Then create a page to display all of that information. Look
   at the mysql
   functions and learn some PHP. We can't help you without
   knowing what's in
   your table and how you want it displayed, etc...
  
   So keep learning and reading and you'll figure out how to 
 do it. Your
   question is way to broad for any help...
  
   ---John Holmes...
  
   - Original Message -
   From: Igor Portnoy [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Wednesday, June 05, 2002 2:40 PM
   Subject: [PHP] Passing variable to new page and pulling the
   rest of info
   from database
  
  
   Hello,
  
  
  
   I am passing a variable to the new page, when user clicks 
 on the link.
   Something like that:
  
   a href=showimage.php?ID=38img src=/some/image.jpg/a
  
  
  
   How can I extract all other information out of my 
 database for that ID
   in the next page (showimage.php)?
  
  
  
   Thanks
  
  
  
  
  
  
   --
   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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Passing variable to the next page

2002-06-04 Thread Igor Portnoy

Here is scenario that I am working on but  have a problem.  I have 10
thumbnail images on the page with information for them created from
database. 

For example:

 



+   +

+ Some  Image  +

+   +



Name of Image: Blah

Author of Image: Blah

 

(I am pulling more info about that image from database, but on this page
I only display Name of Image and  Author of image, the rest of the
info is stored in variables.)

 

I want my users to click on the thumbnail. When they do I want a new
window to open and I want information for that particular image that
they clicked (along with other info that stored in variables for the
same image) to be passed to that new opened page.  How can I pass
information about that particular image to the new page?  Any ideas? 

 

Please Help.




Re: [PHP] Passing variable to the next page

2002-06-04 Thread Pushkar Pradhan

Tag the variables onto the url:
http://mysite.com/newpage.php?firstvar=somevaluesecondvar=othervalue;.
for arrays
?layer[]=alayer[]=blayer[]=c.
or use sessions.
 Here is scenario that I am working on but  have a
problem.  I have 10
 thumbnail images on the page with information for them created from
 database.

 For example:



 

 +   +

 + Some  Image  +

 +   +

 

 Name of Image: Blah

 Author of Image: Blah



 (I am pulling more info about that image from database, but on this page
 I only display Name of Image and  Author of image, the rest of the
 info is stored in variables.)



 I want my users to click on the thumbnail. When they do I want a new
 window to open and I want information for that particular image that
 they clicked (along with other info that stored in variables for the
 same image) to be passed to that new opened page.  How can I pass
 information about that particular image to the new page?  Any ideas?



 Please Help.



-Pushkar S. Pradhan


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




RE: [PHP] Passing variable to the next page

2002-06-04 Thread David Freeman


  Here is scenario that I am working on but  have a problem.  
  I have 10 thumbnail images on the page with information for 
  them created from database. 

  (I am pulling more info about that image from database, but 
  on this page I only display Name of Image and  Author of 
  image, the rest of the info is stored in variables.)

  I want my users to click on the thumbnail. When they do I 
  want a new window to open and I want information for that 
  particular image that they clicked (along with other info 
  that stored in variables for the same image) to be passed to 
  that new opened page.  How can I pass information about that 
  particular image to the new page?  Any ideas? 

Speaking personally, I'd only extract the data you actually need to
display - it will lower your overheads (even if just a little) and you
won't be in a situation where you have to keep data around on the
off-chance that they click the thumbnail for more info.  Then if they do
click the thumbnail get the data you need from the database.  In this
scenario about the only thing you'd need to pass your new page would be
the ID number from the database - then just do a query for what you need
on the new page.

The more images you're dealing with, and the more information you
extract per image, the more effective this will be at saving you
overheads.

CYA, Dave



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




[PHP] passing variable to anti spam mailto script

2002-05-26 Thread Greg Wright

Hello All,

What is the best way (or opinions rather) to pass variables to a anti spam
script.

This is used in place of mailto links in webpages, but am looking for any
simple way to pass information so more than one address can easily be used
in the script, I could use mysql or other, however want to have something
easier than this.

Suggestions ?  (please CC me if mailing to the list) , any examples ?

?PHP
$mailto = 'mailto:[EMAIL PROTECTED]';
header(Location: $mailto);
?

TIA


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




[PHP] Passing Variable

2002-04-17 Thread Ben C.

I know that people have asked about this before, so let me appologize ahead
of time but I need quick help.  I have a url which looks like
http://www.domain.com/remove/index.php?id=test.  I use the echo function ?
echo $id; ? to show the word test.  What I want to do is send this variable
along with other information that a user inputs via a form to the next page
so it can be e-mailed via the mail() function.  Can someone please advice
how to do so.

Thanks,

Ben


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




Re: [PHP] Passing Variable

2002-04-17 Thread Michal Dvoracek

Hello,

store value in hidden field in form, like this:
input type=hidden name=id value=?php echo $_GET['id']; ?

when form is submitted field id contains required value.

or use cookie (but here is test if cookie enabled)


Regards
Michal Dvoracek  [EMAIL PROTECTED]


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




[PHP] Passing variable with slashes in URL

2001-05-16 Thread Claudia Smith

Currently I have a problem with IE.  The IE browser will not bring up my
encoded url.  When clicking on the link I either receive a script error or
nothing happens. The issue is with the double quotes. IE does not recognized
the encoded character %22 for quotes.  IE does seem to process single quotes
(%27) OK.

Here is my code to encode the string variable and create the link

The string I am having problems with = All Inclusive Casa De Campo Golf =
$headline

$url_title = rawurlencode( $headline );
print trtd align = 'left'font face='arial' size='2'a
href='javascript:openQuote(\$main_url/miniquote_form.inc.php3?site=$sitead
=$adheader=$url_title\, \helpWin\);'Contact us for
information/a/font;

Here is what the url looks like in the Netscape browser window

header=%22All%20Inclusive%22%20Casa%20De%20Campo%20Golf

If I include this code:

$headline = addslashes ($headline);

before the:

 $url_title = rawurlencode( $headline );

IE now processes the url link and the string displays correctly for me in my
popup window.

Here is the IE url:
header=All%20Inclusive%20Casa%20De%20Campo%20Golf

However -- NS now displays the string with backslahes.

Here is the comparable NS url:

header=%5C%22All%20Inclusive%5C%22%20Casa%20De%20Campo%20Golf

Here is the code in my form to display the header variable (which I thought
would strip out the slashes)
?php
  $headertitle = stripslashes( $header );
  print $headertitle; ?


I have tried htmlentities as:

$url_title = htmlentites( $headline );  and neither IE nor Netscape would
work -- the url link would not work.  perhaps my syntax is incorrect for
this function?

Claudia






-- 
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] Passing variable with slashes in URL

2001-05-16 Thread Chris Lee

cant say for sure, but I dont play around with rawencode and addslasses for urls, just 
use urlencode()

echo 
a href='index.php?test=. urlencode($text) .test2=. urlencode($test2) .'test/a
;

-- 

 Chris Lee
 [EMAIL PROTECTED]



Claudia Smith [EMAIL PROTECTED] wrote in message 
9duqke$9g1$[EMAIL PROTECTED]">news:9duqke$9g1$[EMAIL PROTECTED]...
Currently I have a problem with IE.  The IE browser will not bring up my
encoded url.  When clicking on the link I either receive a script error or
nothing happens. The issue is with the double quotes. IE does not recognized
the encoded character %22 for quotes.  IE does seem to process single quotes
(%27) OK.

Here is my code to encode the string variable and create the link

The string I am having problems with = All Inclusive Casa De Campo Golf =
$headline

$url_title = rawurlencode( $headline );
print trtd align = 'left'font face='arial' size='2'a
href='javascript:openQuote(\$main_url/miniquote_form.inc.php3?site=$sitead
=$adheader=$url_title\, \helpWin\);'Contact us for
information/a/font;

Here is what the url looks like in the Netscape browser window

header=%22All%20Inclusive%22%20Casa%20De%20Campo%20Golf

If I include this code:

$headline = addslashes ($headline);

before the:

 $url_title = rawurlencode( $headline );

IE now processes the url link and the string displays correctly for me in my
popup window.

Here is the IE url:
header=All%20Inclusive%20Casa%20De%20Campo%20Golf

However -- NS now displays the string with backslahes.

Here is the comparable NS url:

header=%5C%22All%20Inclusive%5C%22%20Casa%20De%20Campo%20Golf

Here is the code in my form to display the header variable (which I thought
would strip out the slashes)
?php
  $headertitle = stripslashes( $header );
  print $headertitle; ?


I have tried htmlentities as:

$url_title = htmlentites( $headline );  and neither IE nor Netscape would
work -- the url link would not work.  perhaps my syntax is incorrect for
this function?

Claudia






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




[PHP] passing variable via url

2001-03-05 Thread Kansas Territory

using PHP 3.x on Linux, I've always been able to pass along a variable like
http://www.domain.com/index.php3?foo=bar

and then I could print out this with something like
echo $foo;
would print out "bar"

I've recently installed the latest PHP4 onto a Windows2000 server, I'm
trying the same thing here, a simple test, and
echo $foo;

gives me nothing

however including a PHPINFO() on the page displays this:
HTTP_GET_VARS["foo"] bar

I'm I missing something here ?


Kevin








Kevin Heflin  | ShreveNet, Inc.  | Ph:318.222.2638 x103
VP/Production | 333 Texas St #175| FAX:318.221.6612
[EMAIL PROTECTED]| Shreveport, LA 71101 | http://www.shreve.net



-- 
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] passing variable via url

2001-03-05 Thread Christian Reiniger

On Monday 05 March 2001 17:43, you wrote:

 using PHP 3.x on Linux, I've always been able to pass along a variable
 like http://www.domain.com/index.php3?foo=bar

 and then I could print out this with something like
 echo $foo;
 would print out "bar"

 I've recently installed the latest PHP4 onto a Windows2000 server, I'm
 trying the same thing here, a simple test, and
 echo $foo;

 gives me nothing

 however including a PHPINFO() on the page displays this:
 HTTP_GET_VARS["foo"] bar

 I'm I missing something here ?

Check whether register_globals is set to "on"

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...to paraphrase Churchill, while representative  democracy may be
terrible, it's still the best system that large corporations can buy.

- David Weinberger JOHO January 25, 2000

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