f



<a href="target.php?link=value"> no longer works in PHP 4.3.6

RH9, Apache 2.0.49, php 4.3.6
been away from php for about 2 years and 
this way used to work, still does in older php versions, now it doesn't.
is there a reason for this? a work around?

Thanx in Advance!!
0
5/28/2004 5:12:28 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

8 Replies
577 Views

Similar Articles

[PageSpeed] 21

On 27 May 2004 22:12:28 -0700, chingayou@yahoo.com (c) wrote:

>RH9, Apache 2.0.49, php 4.3.6
>been away from php for about 2 years and 
>this way used to work, still does in older php versions, now it doesn't.
>is there a reason for this? a work around?
>
>Thanx in Advance!!
be more specific, because that should work... :D
0
s.lahey (23)
5/28/2004 6:15:02 AM
Shane Lahey <s.lahey@roadrunner.nf.net> wrote in 
news:56mdb0l6d881v41mj09jrfj2f7c2ul08ql@4ax.com:

> be more specific, because that should work... :D

perhaps hes means about getting the variables... before $_GET was around?
0
invalid44 (88)
5/28/2004 7:21:03 AM
Theo wrote:
> Shane Lahey <s.lahey@roadrunner.nf.net> wrote in
> news:56mdb0l6d881v41mj09jrfj2f7c2ul08ql@4ax.com:
>
>> be more specific, because that should work... :D
>
> perhaps hes means about getting the variables... before $_GET was
> around?

Actually, he has problems with register_globals.

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.


0
5/28/2004 7:39:47 AM
Berislav Lopac wrote:
> Theo wrote:
> 
>>Shane Lahey <s.lahey@roadrunner.nf.net> wrote in
>>news:56mdb0l6d881v41mj09jrfj2f7c2ul08ql@4ax.com:
>>
>>
>>>be more specific, because that should work... :D
>>
>>perhaps hes means about getting the variables... before $_GET was
>>around?
> 
> 
> Actually, he has problems with register_globals.
> 
> Berislav
> 
> --
> If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
> Groucho, Chico, and Harpo, then Usenet is Zeppo.
> 
> 
If you want to use that, in current versions of PHP, it will save the
arguments into a superglobal known as $_GET.

In the past, if register_globals was enabled, at this page,
"something.php?var=hello"
$var = "hello"

But this created a huge security risk, for example if your script has a
$logged_in = 1; //very lousy and bad code, dude,
The evil user can just use "something.php?logged_in=1" and your site is
toast.

So in recent versions of PHP, to access that particular variable, use $_GET.

e.g. something.php?var1=hi&var2=boo
echo $_GET["var1"]; // hi
echo $_GET["var2"]; // boo

Similarly, POST variables are now under $_POST just fyi.

That's all, hope that helps, have fun!

ccjx

0
ccjx (1)
5/28/2004 3:31:40 PM
"Berislav Lopac" <berislav.lopac@dimedia.hr> wrote in message news:<c96qc2$skc$1@ls219.htnet.hr>...
> Theo wrote:
> > Shane Lahey <s.lahey@roadrunner.nf.net> wrote in
> > news:56mdb0l6d881v41mj09jrfj2f7c2ul08ql@4ax.com:
> >
> >> be more specific, because that should work... :D
> >
> > perhaps hes means about getting the variables... before $_GET was
> > around?
> 
> Actually, he has problems with register_globals.
> 
> Berislav

Yes, it is about getting variables from one page to the next using
that syntax.
I have seen $_GET around but do not know how to incorporate that into
my code using a link.  Tried turning on register_globals in php.ini,
that didn't work either, besides, it is shunned on by programming
community.
Thanx!
0
5/28/2004 3:59:19 PM
chingayou@yahoo.com (c) wrote in news:57807ce.0405280759.edf73f5
@posting.google.com:

> I have seen $_GET around but do not know how to incorporate that into
> my code using a link. 

you dont. you use the link normally 'page.php?var=x' and use $_GET on the 
receiving page '$var = $_GET['var']' then all is good.
0
invalid44 (88)
5/28/2004 5:09:29 PM
On 28 May 2004 08:59:19 -0700, chingayou@yahoo.com (c) wrote:

>"Berislav Lopac" <berislav.lopac@dimedia.hr> wrote in message news:<c96qc2$skc$1@ls219.htnet.hr>...
>> Theo wrote:
>> > Shane Lahey <s.lahey@roadrunner.nf.net> wrote in
>> > news:56mdb0l6d881v41mj09jrfj2f7c2ul08ql@4ax.com:
>> >
>> >> be more specific, because that should work... :D
>> >
>> > perhaps hes means about getting the variables... before $_GET was
>> > around?
>> 
>> Actually, he has problems with register_globals.
>> 
>> Berislav
>
>Yes, it is about getting variables from one page to the next using
>that syntax.
>I have seen $_GET around but do not know how to incorporate that into
>my code using a link.  Tried turning on register_globals in php.ini,
>that didn't work either, besides, it is shunned on by programming
>community.
>Thanx!

in target.php the value of link would be stored in the variable:
$_GET['link']


0
s.lahey (23)
5/28/2004 7:11:18 PM
On 2004-05-28, ccjx <ccjx@newagezone.com> wrote:
> Similarly, POST variables are now under $_POST just fyi.

And all together are shared in $_REQUEST ;)

Bye,
phil
-- 
Please send replies (not followups) to the address set in Reply-To.
Philipp Kern - PK2186-RIPE - http://www.philkern.de
0
trash4886 (40)
5/31/2004 4:47:37 PM
Reply:

Similar Artilces:

php requires ".php" not ".html" ?
Dumb question -- I know, but... Yes, I searched books and googled but couldn't find the answer. Does php always require that the page be .php and not .html ? Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. By the way, how do searchers, eg Google, treat .php? same as .html? Do I lose search position by changing from .html to .php? MasonC masoncXXX@XXXfrontal-lobe.info wrote: > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. > > By the way, how do searchers, eg Google, treat .php? same as .html? > Do I lose search position by changing from .html to .php? > > MasonC It's part of your web server configuration - not PHP. Security conscious hosts will require .php extensions to parse php files. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== At Sun, 06 Jun 2010 14:49:27 -0700 masoncXXX@XXXfrontal-lobe.info wrote: > > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to r...

<a href="file://C:\temp" target="_blank">C:\temp</a> does not work in IE anymore !
Hi, in our webpage, a user could open a windows explorer to his temp directory with a simple link and usage of the file protocol: <a href="file://C:\temp" target="_blank">C:\temp</a> This worked very well a long time, but now it does not work anymore. We use IE6 and Microsoft Windows XP Professional 2002 SP2. I guess it has something to do with new IE security features. Does anybody know a workaround or how we can disable this IE behaviour. Thanks Dieter Dieter Salath? said the following on 11/22/04 13:51: > in our webpage, a user could ...

Installing PHP
I'm a newbie to Apache. This week I installed my first Apache 2.0 server, and it's working fine. I then installed PHP. When I ran the PHP test file ("test.php"), the actual text contents of the file came up in the browser: ---------------- <?php phpinfo(); ?> ---------------- I confirmed that my Apache installation includes the "mod_so.c" module. I made sure that the file "test.php" was in the default htdocs folder. I confirmed that my "httpd.conf" file contained the lines : ---------------- LoadModule php4_module /Library/Apache2/modules/libphp4.so AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps ---------------- I made sure that the directory /Library/PHP4 was installed, and that the "libphp4.so" file was located in /Library/Apache2/modules. I logged out of my system (Mac OS-X 10.3.2) and logged back in, to make sure that Apache restarted. What am I missing? How can I get PHP working? Thanks in advance to all for any info. -Vik -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vik Rubenfeld wrote: > I logged out of my system (Mac OS-X 10.3.2) and logged back in, to make > sure that Apache restarted. Now I known nothing about OSX, but I'm told it's not unlike a unix underneath all the eye-candy. If that is the case, I would think you need to do more then a logout to have Apache restarted. Did you try a reboot? Bob - -- | B. Johannessen <bob@db.or...

Could this be a PHP 4.3.6 "feature"?
[PHP] echo "val = $val<P>"; list($mySection, $myDisplay) = explode('|', $val); echo "mySection = $mySection and myDisplay = $myDisplay<P>"; [/PHP] In using PHP 4.3.6 here are my results: [Quote] val = image|Image Maintenance mySection = image and myDisplay = image [/Quote] I narrowed down the problem to this: [PHP] $blahArray = explode('|', $val); print_r($blahArray); $blahArray = split('|', $val); print_r($blahArray); [/PHP] Nothing prints out, the array $blahArray is never set, not even to an empty array. No error messages nor warnings result in this. Has anyone had any similar problems with PHP 4.3.6 or am I just the "lucky one"? If so, is this an undocumented bug in 4.3.6 (all I could find in www.php.net was that there was a negative limit to explode() ). I am unable myself to bounce the webserver as I do not have [yet] the privileges to do so to figure if that might be a requirement, so until the system admins have the time to do so (takes a minute *sigh*) I am trying to cover all possible angles to this rather wacky problem. Phil "Phil Powell" <soazine@erols.com> wrote in message news:1cdca2a7.0407260815.76308879@posting.google.com... > [PHP] > echo "val = $val<P>"; > list($mySection, $myDisplay) = explode('|', $val); > echo "mySection = $mySection and myDisplay = $myDisplay<P>"; > [/PHP] hmm.. it would s...

Coppermine & GD
I had not enabled GD yet, so I reconfigured and recompiled my PHP like so: ./configure --with-apxs=/www/bin/apxs --with-zlib --width-gd make make install I restarted apache, and tested out some GD-related functions and it works fine: // create a 200*200 image $img = imagecreate(200, 200); // allocate some colors $white = imagecolorallocate($img, 255, 255, 255); $black = imagecolorallocate($img, 0, 0, 0); // draw a black circle imagearc($img, 100, 100, 150, 150, 0, 360, $black); // output image in the browser header("Content-type: image/png"); imagepng($img); // free memory imagedestroy($img); .... however when I try to upload a file to Coppermine Photo Gallery I get the same old: "PHP running on your server does not support the GD image library" Is this a Coppermine issue, or a PHP configuration issue? ...

How do I specify <a href="..." target="_blank">...</a> in XHTML STRICT?
The code <a href="..." target="_blank">...</a> will not validate as XHTML STRICT because of the 'target' tag, so how do I achieve the same result by moving it to a CSS file? I cannot find anything which allows me to specify 'target=' on an anchor tag. -- Tony Marston http://www.tonymarston.net Tony Marston wrote: > The code > <a href="..." target="_blank">...</a> > will not validate as XHTML STRICT because of the 'target' tag, so how do I > achieve the same result...

"<<previous<< 2 3 4 5 >>next>>" scheme
hi all, I am creating a web project with php/mysql. one of qeury result is too high. it returs several thousand rows. But I can't show them in one page. So I wanna create more than one pages then I shall use "<<previous<< 2 3 4 5 >>next>>" scheme. but i don't have any idea. If user clicks 3rd page. I shall show the 3rd page. How should I do this ? should I again query the whole or a portion ? what is the function related to this. Thank in advance Also sprach hSiplu: > I am creating a web project with php/mysql. > one of qeury result is too high. it returs several thousand rows. > But I can't show them in one page. > So I wanna create more than one pages > then I shall use "<<previous<< 2 3 4 5 >>next>>" scheme. > but i don't have any idea. > If user clicks 3rd page. I shall show the 3rd page. > How should I do this ? > should I again query the whole or a portion ? what is the function > related to this. You could use MySQL's LIMIT clause. if I use select * from t1 limit 10; it shows first 10 returned rows. It wont work. it would work if an range could be used oh I have found it ! limit [offset,] row_count that solves everything :) ...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

<a href="http://www.tkqlhce.com/email-2417862-10464686" target="_top">WebTicketStore.com
<a href="http://www.tkqlhce.com/email-2417862-10464686" target="_top">WebTicketStore.com - <a href="http://www.tkqlhce.com/ email-2417862-10464686" target="_top">WebTicketStore.com - NBA Basketball Tickets</a> <img src="http://www.lduhtrp.net/image-2417862-10464686" width="1" height="1" border="0"/></a> <img src="http://www.lduhtrp.net/image-2417862-10464686" width="1" height="1" border="0"/> ...

[VIM] change "VARIABLE <relational operator> VALUE" to "VALUE <relational operator> VARIABLE"
In C/C++ the following style of check is preferred : VALUE <relational operator> VARIABLE instead of VARIABLE <relational operator> VALUE eg: if( 5 == data ) is preferred over if( data == 5 while( CONST_NAME != value ) is preferred over while( value != CONST_NAME) I have do the above suggested changes throughout the file. How do I do it using vim ? This is an interesting problem, with several parts. First we'll need a r.e matching constants: [0-9.]\+\|"[^"]*" is a first approximation; it misprocesses strings with internal "'s...

"new" [<TypeArguments>] <ClassOrInterfaceType> "(" [<ArgumentList>] ")"
According to http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.9 the following production holds <ClassInstanceCreationExpression> ::= "new" [<TypeArguments>] <ClassOrInterfaceType> "(" [<ArgumentList>] ")" What would be an example for a class instance creation expression with type arguments? Here's a reminder about those: <TypeArguments> ::= "<" <TypeArgument> {"," <TypeArgument>} ">" What I would understand would be: <ClassInstanceCre...

Problem updating PHP 4.3.0 DEV to PHP 4.3.3
Hi! I had Apache 2.0.47 and PHP 4.3.0 DEV running successfully on a W2k Server. For some reason, I couldn't get PHP to read XML-Attributes with the DOM XML -functions. So I thought, it would be time to update PHP to a newer version. So I simply replaces the old php-files with the new ones and of course kept the php.ini. But now, PHP doesn't work anymore. As soon as I request a page with php code, I get a "document contains no data" error after a while. (Apache's error log looks like the excerpt at the end of this message) If I install PHP5, I can't even start Apache. Does anyone have an idea, what may go wrong here? Thanks in advance, Tobias [...] [Wed Sep 24 20:46:56 2003] [debug] child.c(695): Child 3196: Worker thread 248 starting. [Wed Sep 24 20:46:56 2003] [debug] child.c(695): Child 3196: Worker thread 249 starting. [Wed Sep 24 20:47:24 2003] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Wed Sep 24 20:47:25 2003] [notice] Parent: Created child process 3032 [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(505): Parent: Sent the scoreboard to the child [Wed Sep 24 20:47:25 2003] [notice] Child 3032: Child process is running [Wed Sep 24 20:47:25 2003] [info] Parent: Duplicating socket 220 and sending it to child process 3032 [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(426): Child 3032: Retrieved our scoreboard from the parent. [Wed Sep 24 20:47:25 2003] [debug] mpm_winnt.c(623): Parent: Sent 1 listeners to chi...

Sending PHP variables through echo "<form>"
I'm using a PHP script to regenerate repetitive paypal buttons and I'm trying to make each button specific based on variables from that current cycle. I have this actually: $paypalbutton='<form action="https://www.paypal.com/cgi-bin/ webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="AceIncorporated@gmail.com"> <input type="hidden" name="item_name" value="{$line[0]} scented candle - {$line[1]}"> <input type="hidden" name="item_number" value="001"> <input type="hidden" name="amount" value=\"{$line[$p]}\"> <input type="hidden" name="shipping" value="15.00"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="image" src="https://www.paypal.com/en_US/i/btn/ btn_buynow_SM.gif" border="0" name="submit" alt="Make payments ...

How to "quote code" in PHP?
I'm trying to put together a little page with a form, so that users can "translate" any URL into the correct format for posting on a forum. For instance, they want to share a link and type in "www.google.com" (without quotes) and the form turns it into "<a href="www.google.com"></a>" (without the beginning and end quotes) and displays that as text, so that they can copy/paste it into the forum post box. It will also include an image-posting version so that it adds the "<img src" etc to an image URL. How do I "quote" the result so that it displays as plain text rather than a mess? All I'm getting is a mess of blue code. On Thu, 19 May 2011 23:31:47 +0100, in comp.lang.php "Mentalguy2k8" <Mentalguy2k8@gmail.com> <ir45oo$mik$1@dont-email.me> wrote: >| I'm trying to put together a little page with a form, so that users can >| "translate" any URL into the correct format for posting on a forum. >| >| For instance, they want to share a link and type in "www.google.com" >| (without quotes) and the form turns it into "<a href="www.google.com"></a>" >| (without the beginning and end quotes) and displays that as text, so that >| they can copy/paste it into the forum post box. It will also include an >| image-posting version so that it adds the "<img src" etc to an image URL....

"smart" quotes in PHP
Hello all, I've been struggling for a few days with the question of how to convert "smart" (curly) quotes into straight quotes. I tried playing with the htmlentities() function, but all that is doing is changing the smart quotes into nonsense characters. I also searched the web for quite a while and was unsuccessful in finding a solution. What puzzles me is that doing it the other way around is simple enough. For example, this works fine in converting a straight quote into an "open" smart quote: if ($content[$k] == "\"") $content = substr($content, 0, $k) . "&#147;" . substr ($content, $k+1, strlen($content)-$k+1); But the other way around doesn't work. Any ideas? Thanks, Martin Goldman My e-mail addresse's correct domain name is mgoldman.com. Martin Goldman <www@nowhere.foo> wrote: > I've been struggling for a few days with the question of how to convert > "smart" (curly) quotes into straight quotes. Smart/curly quotes? straight quotes? What are these? > What puzzles me is that doing it the other way around is simple enough. > For example, this works fine in converting a straight quote into an > "open" smart quote: > > if ($content[$k] == "\"") > $content = substr($content, 0, $k) . "&#147;" . substr > ($content, $k+1, strlen($content)-$k+1); Funny way to do a str_replace :)...

php links "breaks" each other
Hi! Sorry for the stupid subjekt, but coudn't get it better. I want that the user can chouse the skin of the site that I do by : ********************************************** <? if(empty($_GET['style'])){ $_SESSION['stylesheet'] = "master"; } else { $_SESSION['stylesheet'] = "jojje"; } echo '<style type="text/css" media="all">@import "'.$_SESSION['stylesheet'].'.css";</style>'; ?> /////// Change skin to: <br> <a href="?style=jojje"> Jojje</a> <br> <a href="?"> Default</a> <br> ************************************************ then I use similary metod for the meniu: ************************************************ <?php switch($_GET['page']){ case 'banner': include('banner.html'); break; default: include('main.php'); } ?> /////// <a href="?page=banner">Banner</a> ************************************************ well abbiosly it don't work... whats heppends is that when I change skin to jojje and click om banner link the banner page is getting loadet but made skin choise disappears .... so please can somebody help my to get to follow upps to work! getting desperate.... thanx in advance carramba wrote: ><? // if there is no "style" in the URL > i...

IS a PHP programmer typing <?php ?> most of the time when he is at work?
IS a PHP coder typing opening and closing tags most of the time when he is at work? tenxian schreef: > IS a PHP coder typing opening and closing tags most of the time when > he is at work? (Sigh, the troll is back. Let's throw something at him. Maybe it will keep him quit for a day or so.) Hi Tenxian! Very good question! And a smart one too. I like good questions. I also really like smart good looking people like you! Your mom and dad also think you are doing great. Thanks for your question! Byebye my love! With high regards, Erwin Moller On 30 Apr, 09:34, Erwin Moller <Since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote: > tenxian schreef: > > > IS a PHP coder typing opening and closing tags most of the time when > > he is at work? > > (Sigh, the troll is back. > Let's throw something at him. Maybe it will keep him quit for a day or so.) LOL On Apr 30, 5:44 am, tenxian <hi.steven...@gmail.com> wrote: > IS a PHP coder typing opening and closing tags most of the time when > he is at work? Go back to your hug box. tenxian wrote: > IS a PHP coder typing opening and closing tags most of the time when > he is at work? You have a better way? Enlighten us, Your Honor. :) -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 7.10) Linux 2.6.25 ^ ^ 19:57:01 up 1 day 6:43 0 users load average: 1.01 1.03 1.02 �...

calling a php script using img src ="random.php"
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to call that in another page so that i get a random image the page is http://2006ymcanationals.com/index.php using <img src="random.php"> It is not working. I have tried using the full path to the "random.php". I have also tried naming the main page index.html and index.php. neither work. what am i missing? Searching these groups it looks like this should work. Thanks in advance. Brad <bhennon@gmail.com> wrote in message news:1111008806.788804.63370@l41g2000cwc.googlegroups.com... > Hey all, > > I have a small php script that calls a random image at the following > page. > http://www.2006ymcanationals.com/random.php > > IT WORKS IF I go directly to the above link. > > I am trying to call that in another page so that i get a random image > the page is http://2006ymcanationals.com/index.php using <img > src="random.php"> > > It is not working. I have tried using the full path to the > "random.php". I have also tried naming the main page index.html and > index.php. neither work. > > what am i missing? Searching these groups it looks like this should > work. > > Thanks in advance. > > Brad It's hard without looking at the code. The images seem to be different n...

php reference in <SCRIPT> tag gives "Error on page" in IE6.0
Hi, I have some problems with a PHP reference in a <SCRIPT> tag, but only with the Internet Explorer, which gives a "Error on page" message in the Status Bar. The code is as follows : <script> <!-- var stat =<?php echo stripslashes($status); ?>; window.status = stat; //--> </script> The error given is : Line:24 Char:13 Error: Syntax error Code: 0 Char 13 is the "<" or looking to the source of the page with the IE browser, it's ";" I get the error message as said before only in the Internet Explorer browser and it does not affect the display nor the functionality of the page, but it's not good looking ... Has anyone out there a solution to get rid of the "error" ? Thanks in advance. On 8 Feb, 13:27, "rukkie" <ruk...@belgacom.net> wrote: > Hi, > > I have some problems with a PHP reference in a <SCRIPT> tag, but only > with the Internet Explorer, which gives a "Error on page" message in > the Status Bar. > The code is as follows : > <script> > <!-- > var stat =<?php echo stripslashes($status); ?>; > window.status = stat; > //--> > </script> > > The error given is : > > Line:24 > Char:13 > Error: Syntax error > Code: 0 > > Char 13 is the "<" or looking to the source of the page with the IE > browser, it's ";" > > I get the ...

Variable passing to script to fill html <img src="MyScript.Php?ImageName=KnownGoodData" >
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in - ImageName - for processing, or the return data which is done (or not as the case may be) by imagejpeg($img) in the script, after header("Content-type: image/jpeg"). Any insights would be most welcome, especially debugging techniques and a pointer to resources to help me get a better feel for this complex landscape. Many thanks, Gregory Gregory <php at neutrino-soft @@@ ware.co.uk> wrote: > I'm trying to do the above in order to process an image and return the > result to an html image control. It fails and my key suspects are either > the variable that I'm passing in - ImageName - for processing, or the > return data which is done (or not as the case may be) by imagejpeg($img) > in the > script, after header("Content-type: image/jpeg"). Hi Gregory, It would help if you could post the relevant code and error messages. Stab in the dark: Do you use $_GET['ImageName'] to retrieve the value? JOn Hello Jon, No, I wasn't, but it still doesn't work. Here's part of the loop that prints details and tries to print the image: <?php $FilNam = $row_PrpSummary['FileName']; ?> <td><img src="mkimg.php?ImageName=$FilNam" ></td> <td> Then mkimg.php sta...

Quoting PHP code in a .php file???
I am new to PHP and I want to quote the followong content into a Web page <html> <head><title>Connect Server</title></head> <body> <? $link = mysql_connect("localhost",$_POST['username'],$_POST['password'])or die("Connect Error: ".mysql_error()); print "Successfully connected.\n"; mysql_close($link); ?> </body> </html> The Web page is generated by a xxx.php file and what I want to be q quote is executed rather than displayed. I have tried to surround it with block formatting HTML elements such as <blockquote> or <pre> but the PHP code surrounded by "<?" and "?>" always get executed and throws errors. How can I simply quote it and display it on the page? Thank yoy Georges Georges Trottier wrote [edited]: > How can I simply quote and display [HTML with PHP code] on the page? How do you get the contents you're trying to display? Try these: http://www.php.net/htmlentities http://www.php.net/highlight_file -- Mail to my "From:" address is readable by all at http://www.dodgeit.com/ == ** ## !! ------------------------------------------------ !! ## ** == TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>) may bypass my spam filter. If it does, I may reply from another address! Georges Trottier wrote: > <html> > <head><title>Connect Serve...

reading "<?" from a php file
I am trying to read a.php file from another PHP file using fgets() and display its contents. As a.php starts with <? the browser IE6 does not show anything, although I can see all the contents in View-Source. I tried to skip the line with <? using the following code: @ $fp=fopen("a.php","r"); while (!feof($fp)) { $line=fgets($fp); if (!$line=="<?") { echo $line; } else { echo "w"; } However it keeps outputting "w" for every line of a.php. This does not change even is I reverse the condition to if (!$line=="<?") as if whatever is returened by fgets($fp) cannot be compared to "<?". I tried to add the end of the line to the pattern (!$line=="<?\n") or ($line=="<?\n") - same result. What is that I am doing wrong? Your first line, which opens the file, suppresses any error message and you don't test for any errors. I bet you this $ sign that if you remove the '@' you will see an error message. Tell us what the error message is and we can help. --- Steve aa wrote: > I am trying to read a.php file from another PHP file using fgets() and > display its contents. As a.php starts with <? the browser IE6 does not > show anything, although I can see all the contents in View-Source. > > I tried to skip the line with ...

error_log : $_COOKIE "Undefined index" "PHP Notice"
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : $http_ref= $HTTP_REFERER; $prog = $_COOKIE['cpm'."$j"]; $redirect .='Location:'.$uploadpath; We believe HTTPD does not understand environement variables. We had to put that : error_reporting(0); in the top of the file to get the errors stop to be reported. An expert said to insert an isset funtion : http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Installation/Q_21354370.html But that doeas lead to a success. From your background and experience, how do you think we can fix up the code ? Regards; Gle Cougloff Pseudonyme wrote: > Dear All : > > Ever had an httpd error_log bigger than the httpd access log ? > > We are using Linux-Apache-Fedora-Httpd 2006 configuration. > > The PHP lines code that lead too tons of errors are : > > $http_ref= $HTTP_REFERER; > $prog = $_COOKIE['cpm'."$j"]; > $redirect .='Location:'.$uploadpath; > > We believe HTTPD does not understand environement variables. > > We had to put that : error_reporting(0); in the top of the file to get > the errors stop to be reported. > > An expert said to insert an isset funtion : > http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Installat...

How to do PHP "require()" or TCL "source" in bash script
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure out how to do this in bash script as the requirement is necessary for a migration script to obtain the code from a .cfg file and then be able for the "parent" script to run the code it "imported" from the .cfg file, much like PHP's require() or TCL's "source". This is what I have so far and it fails: if [ -f ivc.cfg ]; then cat ivc.cfg fi Anyone...

Web resources about - <a href="target.php?link=value"> no longer works in PHP 4.3.6 - comp.lang.php

Resources last updated: 3/24/2016 4:28:51 AM