[PHP] Re: New-line characters
You'de be better off using the built in nl2br() function (http://www.php.net/manual/en/function.nl2br.php) it'll have the same effect as a it'll insert a br tag everwhere a newline character occurs. Where 2 newline characters occur it will produce brbr which in your HTML will break your text in the same way that a p tag would. James Stewart [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]. .. Hi, I have a form for users of a system I am developing to add their newsletters to a MySQL database through. I take their input and INSERT it straight into the database after adding slashes. When I retrieve the information from the database I would like to replace double occurences of new-lines with a p tag. Can anyone tell me what regexp I should be searching for? cheers. James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-GENERAL] animated gif
Sounds like you'll have to use PHP to to first create the images. Then in your output page just include some javascript to rotate the images. If you have to you can use PHP to write the javascript. Jessica Lee Tishmack [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... can you incorporate java script into php? (I am using php because each image has to be generated on the fly, based on a data set...realtime data) Thanks, Jessica On Thu, 11 May 2000, Liz Kimber wrote: You could try making the number of images and use a continusuly running java script to switch them, which is kinda all an animated gif is hence they stop often when you press the stop button! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script-controlled tablewidthchange, for diff. screen resolutions
Sounds like you might be trying to do things the hard way. Wouldn't it be easier to simply set the table widths as a percentage rather than an exact width in pixels? Eg. width=50% The above example will set the table width to 50% of the browser window width. Or maybe you could use a bit of DHTML and javascript to do the resizing instead? If you really badly want to do it the way you described below I guess you could use javascript to detect the values for screen width and height and then send them to PHP. Helmut Ott [EMAIL PROTECTED] wrote in message news:009f01bfbda6$2e8c9850$09bf06d5@pentium... Hallo everybody, huuh - has anybody seen a scriptbased, parametric pagelayout control? Depending on the viewers screen resoltion I would like to change table and cell widths in my page. This would mean I only need ONE version. The screen resolution detection would e.g. find a width of 640 pix. Say my sttandrad res. was 800 than a factor could calulated by setting Factor=res. viewer / res. standard. In the above sample this would be 640 / 800 = 0,8 as factor-value. All page, table, row, cell, images width (and heights) would have to be multilied with this factor. As the screen res. can only be analysed on the clientside it must be e.g. a javascript to do that. Did anybody hear about any way to get this done. Any tip is greatly appreciated. Helmut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript and PHP??
?php header(Location: $csv_filename); ? Mikhail Avrekh [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can say something like: ?$csv_filename= whatever.csv;? script language=javascript window.open(?=$csv_filename?, target, resizable,status,width=500,height=200); /script On Wed, 3 Apr 2002, Joe Keilholz wrote: Hello All! I think this is a pretty simple question. I have a file that I am writing information to and when the process is complete, I am needing to send the file to the user. In Javascript all I would need to do is window.open() and the file would be sent to the user (it's a .csv file). How would I accomplish this in PHP? Can I incorporate Javascript into my PHP code? If so, how? Any help would be appreciated! Thanks! Joe Keilholz -- 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] Re: Remembering choices
That's exactly what sessions are for, check out http://www.php.net/manual/en/ref.session.php for more info about using sesions. Hi, I have a menu, where I would like to be able to store which link the user last pressed. What is the best way of doing this? I thought about sessions, but is it possible to define some sort of global variable that I can access from all my pages? Regards, Morten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Really slow include
What you need to do is include the path to the file in relation to the file that is including it, this can be an absolute path or a relative path. Eg. Assuming the file is located in /www/foo/htdocs/foo/index_test.php and the include file is in /www/foo/htdocs/ Absolute path: require(/www/foo/htdocs/header.htm); Relative path: require(../header.htm); It may be easiest to use a variable for the include path. Eg. $includePath = /www/foo/htdocs/; require($includePath.header.htm); I hope this helps. Anti-Blank [EMAIL PROTECTED] wrote in message 007c01c1da8e$a12062f0$6601a8c0@noblesse">news:007c01c1da8e$a12062f0$6601a8c0@noblesse... I have a header section for my website and I'd like to include it into each page. Since this is where I'm housing all of my navagation. Here is my problem though. I have the header tables sitting in a page header.htm. I'm calling it as so: ? require (header.htm) ? This works fine as long as I stay in the main folder /htdocs where the header.htm file is. The problem lies when I go any deeper. I tried replacing the link with: ? require (/header.htm) ? Hoping that would put it back to the /htdocs folder as it works for my standard links. Instead I get this: Fatal error: Failed opening required '/header.htm' (include_path='.:/usr/local/lib/php') in /www/foo/htdocs/foo/index_test.php on line 82 I've tried correcting it by including the full path: ? require (http://www.foo.com/header.htm;) ? This does work but it's so amazingly slow. Even on my cable connection it will take 20-30 seconds to load this. I've switched back and forth between require and include with no change in speed. Anyone have a suggestion or an idea on why my load time is suffering so much? I hope all of that was clear enough. Thanks anti-blank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php