[PHP-DB] Need Help on Chat Program!!!!!
Hi everyone, I have designed a chat program which used a refresh function to update the chat list every 10 second. But How can I perdict the flicker screen, or Can anyone tell me how to re-write the program so everytime people send message to the chat box, the chat box will not flicker at all. Oh, Please I'm not really good at PHP, so,please give me more details on it. Thanks. so much. Regards, Kelvin. Main window --index.html (break down into two frame. topframe for chat box, bottonframe for input message) Bottonframe PHP will save the message to file. Topframe PHP will refresh every ten second and retrieve the data from the file. -- PHP Database 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-DB] Need Help on Chat Program!!!!!
What I do is have an invisible frame that checks the timestamp of the last update to the chat against your last refresh timstamp. If it's superior, I refresh the chat list. I actually make this check without a call to the database, if you have 100+ chatters, check calls to the db can become heavy. I just have a file that holds the last update tstamp and read this file. The check page refreshes itself every 20 seconds (plenty enough for a chat I realized) and has the last given value of a refresh. You can see my chat at http://zc8.com, you have to login though. On Thursday 08 November 2001 01:09 pm, kelvin wrote: > Hi everyone, > > I have designed a chat program which used a refresh function to update > the chat list every 10 second. But How can I perdict the flicker screen, or > Can anyone tell me how to re-write the program so everytime people send > message to the chat box, the chat box will not flicker at all. Oh, Please > I'm not really good at PHP, so,please give me more details on it. Thanks. > so much. > > Regards, > Kelvin. > >Main window --index.html (break down into two frame. > topframe for chat box, bottonframe for input message) > >Bottonframe PHP will save the message to file. >Topframe PHP will refresh every ten second and retrieve the > data from the file. -- PHP Database 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-DB] Session Broken
At 9:25 AM + 11/8/01, Russ Michell wrote: >1: Rid any whitespace between '2: You need to populate the variable you wish to use as a session >variable before registering it Is 2 actually true? The sessions chapter in the PHP manual doesn't seem to specify any order for using and registering, and in fact gives examples to the contrary (see examples 2 and 3 in the chapter). > >session_start(); >if(!isset($UserName)){ >$UserName = "guest"; >session_register('"UserName'); >} > >//rest of script goes here >?> > >HTH >Russ > >On Wed, 7 Nov 2001 20:02:03 -0500 Matthew Tedder <[EMAIL PROTECTED]> wrote: > >> >> Can anyone tell me why my session isn't working? I have attached >>the problem >> script. Without even going to another page, the $PHPSESSID and $UserName >> variables are both empty. They are also empty on subsequent pages. >> >> It starts with: >> = >> > >> session_start(); >> session_register("UserName"); >> >> /*=<< Check for New User Session >>=*/ >> if(!isset($UserName)) >> { >>$UserName = "guest"; >> }; >> == >> >> And toward the end, it has the following: >> == >> function ShowMessage($message) >> { >>print "\n"; >>print "\n"; >>print "$UserName ($PHPSESSID): >> $message\n"; >>print "\n"; >> } >> >> ?> >> == >> >> In this function, the variables are flat empty. > > > > --Matthew >> > >#---# > > "Believe nothing - consider everything" > > Russ Michell > Anglia Polytechnic University Webteam > Room 1C 'The Eastings' East Road, Cambridge > > e: [EMAIL PROTECTED] > w: www.apu.ac.uk/webteam > > www.theruss.com > -- PHP Database 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-DB] Looking for a JavaScript routine built by PHP and populated from MySQL
Hello, I need to build a chunk of code which creates a click through view of all pictures in a given directory. The URL for each image is stored in a MySQL table as part of the image upload routine. I am thinking there would be PHP routine that says something like ... 1. (PHP) - For every create an array filled with product image URLs 2. (JavaScript) - Display array value(av) 1 ... assign av2 as href for "next button" 3. (JavaScript) - In click next, display av2, set href for "next" to av3, set href for "previous" to av1 4. (JavaScript) - At end of array, reset next to av1 (create loop) Does that description make sense? Has anyone already written a similar beast? I am in a time crunch, any and all help is appreciated. Regards, Doug Daulton -- PHP Database 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-DB] Looking for a JavaScript routine built by PHP and populated from MySQL
Hello!! So you have a page that show pics and you want to have something that show the next and back url...right??? Dan On Thursday, November 8, 2001, at 04:23 PM, Doug Daulton wrote: > Hello, > > I need to build a chunk of code which creates a click through view of > all > pictures in a given directory. The URL for each image is stored in a > MySQL > table as part of the image upload routine. I am thinking there would > be PHP > routine that says something like ... > > 1. (PHP) - For every create an array filled with product image > URLs > 2. (JavaScript) - Display array value(av) 1 ... assign av2 as href for > "next > button" > 3. (JavaScript) - In click next, display av2, set href for "next" to > av3, > set href for "previous" to av1 > 4. (JavaScript) - At end of array, reset next to av1 (create loop) > > Does that description make sense? Has anyone already written a similar > beast? I am in a time crunch, any and all help is appreciated. > > Regards, > > Doug Daulton > > > > -- > PHP Database 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 Database 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-DB] Oracle, PHP4, BSD
These are pretty basic questions, but I would appreciate help: I need to access Oracle (already running on a separate server) via PHP4 from a FreeBSD Server. 1) Can this be done? (if so...) 2) Where do I find instructions? 3) Where do I get php_oci8 4) Do I HAVE to install code from Oracle (the Oracle client, etc) on my server? (if so,,,) 5) Where do I get that client software? Thanks Dave Witten -- PHP Database 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-DB] Session Broken
> >1: Rid any whitespace between ' >2: You need to populate the variable you wish to use as a session > >variable before registering it I don't agree with that either >> Without even going to another page, the $PHPSESSID and >> $UserName variables are both empty. They are also empty on subsequent >> pages. If you don't leave the page and your variable is empty, that means it in empty within PHP in the first place. The variable within the session will not be retrieved until you hit the next page. Your PHPSESSID will be also empty because it is the value that get transferred to another page.If you didn't transfer yet, you will not have a value. If you want your session id, do: $sessid=sessionid(); Also, be careful about the scope of your cookies. A session is transfered through cookies in php (if available) and if you don't set your scope right, your session can be lost from one folder to another. That brings me to a MySQL question for knowledgeable people: I don't use php sessions but a custom session that is stored in a simple tables. I just transfer the a variable which holds the id to my session (which is a primary auto-increment int) that points to a row which holds all the information I need about the user. Is it smart or is it a total waste of resources and I should stick with php built in support for sessions? So far, I never experienced any problems with it. -- PHP Database 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-DB] Not a valid MySQL result resource
-- PHP Database 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-DB] Not a valid MySQL result resource
At 2:04 AM +0100 11/9/01, MPropre wrote: >//.../... first part of the code is to connect to the right DB on a MySQL >server. It works fine > > >//This code to show the query. It runs well under MySQL and gives 1 result : > $query="SELECT Login, Password FROM `user` WHERE user.login=''$login'' and >user.password=''$password''"; > >//This var should contain a query result ressource: > $result_query=mysql_query($query); > >//Here's my error message after executing: Not so fast. Where's your error checking to verify that the query actually succeeded? if (!$result_query) { die ("Gee, I guess error checking is a good thing after all!" . mysql_error ()); } >// Supplied argument is not a valid MySQL result resource in this line: > $result_table=mysql_fetch_array($result_query); > >// I thought that this var ($result_table) should contain the row of 2 cells >//And I expected to read $result_table['login'] or $result_table[0] as the >first cell of the row... >// I any of you can help me, poor php newby... :o) Great thanks !! > >?> > > > >-- >PHP Database 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 Database 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-DB] what's a GOOD starting HOURLY rate for a PHP/MYSQL job?
okay, you consultants... i'm gonna venture at work to do some side jobs here for some online dynamic web pages. but what would be a good starting pay rate? or would you contract for the entire job? what about a per PAGE/SCRIPT basis? thanks... -- Leo G. Divinagracia III [EMAIL PROTECTED] -- PHP Database 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-DB] Not a valid MySQL result resource
> //.../... first part of the code is to connect to the right DB on a MySQL > server. It works fine > //This code to show the query. It runs well under MySQL and gives 1 result : > $query="SELECT Login, Password FROM `user` WHERE user.login=''$login'' and > user.password=''$password''"; > //This var should contain a query result ressource: > $result_query=mysql_query($query); > //Here's my error message after executing: > // Supplied argument is not a valid MySQL result resource in this line: > $result_table=mysql_fetch_array($result_query); > // I thought that this var ($result_table) should contain the row of 2 cells > //And I expected to read $result_table['login'] or $result_table[0] as the > first cell of the row... > // I any of you can help me, poor php newby... :o) Great thanks !! > ?> =Please check the archives for advice about checking the result of every mysql_...() call. It's much better to know/be told by PHP/MySQL than to say "I thought that...I expected to ..." =the $query assignment statement contains multiple double-quotes. These cannot be 'nested'. Use a mixture of single and double-quotes or 'escape' the inner set(s). =also (and this may be a function of our email packages not a PHP thing) are those single quotes around user? =dn -- PHP Database 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-DB] Create new directory-wenni
Dear Russ, Thank a lot. Your tips do help me. This is the answers I get through my research: $oldumask = umask(0); if(mkdir("path", 0777)) {echo "New directory created!!";} else {echo "Couldn't create directory";} umask($oldumask); Thank a lot. regards, Wenni > -- PHP Database 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-DB] Not a valid MySQL result resource
I'd check for mysql_num_rows( $result_query) > 0 as well. It's entirely possible the user mis-typed the login or password values. Miles At 07:26 PM 11/8/01 -0600, Paul DuBois wrote: >At 2:04 AM +0100 11/9/01, MPropre wrote: >>>//.../... first part of the code is to connect to the right DB on a MySQL >>server. It works fine >> >> >>//This code to show the query. It runs well under MySQL and gives 1 result : >> $query="SELECT Login, Password FROM `user` WHERE user.login=''$login'' and >>user.password=''$password''"; >> >>//This var should contain a query result ressource: >> $result_query=mysql_query($query); >> >>//Here's my error message after executing: > >Not so fast. Where's your error checking to verify that the >query actually succeeded? > >if (!$result_query) >{ > die ("Gee, I guess error checking is a good thing after all!" > . mysql_error ()); >} > >>// Supplied argument is not a valid MySQL result resource in this line: >> $result_table=mysql_fetch_array($result_query); >> >>// I thought that this var ($result_table) should contain the row of 2 cells >>//And I expected to read $result_table['login'] or $result_table[0] as the >>first cell of the row... >>// I any of you can help me, poor php newby... :o) Great thanks !! >> >>?> >> >> >> >>-- >>PHP Database 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 Database 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 Database 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-DB] inserting array into mySQL
I have an array coming from a form that I need to insert into mySQL. example: name[], phone[], address[] Please help? -- PHP Database 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-DB] php, oracle and ascii characters
We are creating a content management system for a web site. In this app,I am filling the contents of an html text area with the contents of a field in an oracle database. This is our dynamic content for the site.The text area allows the user to update its contents. For the time being, any characters oracle considers illegal were to be entered by the client manually in their ascii form. For instance, ' will be '. We thought this would be a short term solution allowing the browser to see the characters correctly, and the database to not error on the update. The content can be saved to the database correctly, but when it is retrieved there seems to be a conversion going on. I am seeing the character interpreted as \' causing the next update on this field to fail. It is strange because when I view the source, the html correctly keeps the ', but when I use it in a php string and send it to the database, it seems to be making a switch. I need to keep this consistantly in its ascii representation, except when it is viewed in a browser. Thanks, I'm desparate! Dan -- PHP Database 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-DB] Newbie Question
Ok, I am still fairly new at PHP and MySQL also, so please bear with me. TASK: I have a client that wants to have job openings listed on their site and they want to be able to add, edit and delete the postings themselves. I would do this in flat-file format but there is the risk of that file size getting too large and slowing down the server. SOLUTION: I have created a MySQL database that will hold all the postings in a table called 'jobs' and have created a PHP form that will post this jobs into the db. PROBLEM: When I go to the PHP form and enter all of the pertinent job information, there is one specific field that will have to have carriage returns/line breaks in it between paragraphs. Everything is working except for this. Is there a way whenever the user presses , that either PHP/MySQL will convert this into a tag only when being displayed in a browser and not in the db?? Can anyone out there please help me with this? I am available off-list as well if it will be easier to pass code back and forth. Any assistance is greatly appreciated! Should you have any questions, comments or concerns, feel free to call me at 318-338-2034. Thank you for your time, Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A == Bayou Internet..(888) 30-BAYOUhttp://www.bayou.com Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net Vicksburg Online..(800) MISSISSIPPIhttp://www.vicksburg.com == Tel: (318) 338-2034ICQ: 38823829 Fax: (318) 323-5053 -- PHP Database 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-DB] RE: [PHP] Newbie Question
use nl2br! http://www.php.net/manual/en/function.nl2br.php Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___ -Oorspronkelijk bericht- Van: Jay Fitzgerald [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 8 november 2001 16:54 Aan: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Onderwerp: [PHP] Newbie Question Urgentie: Hoog Ok, I am still fairly new at PHP and MySQL also, so please bear with me. TASK: I have a client that wants to have job openings listed on their site and they want to be able to add, edit and delete the postings themselves. I would do this in flat-file format but there is the risk of that file size getting too large and slowing down the server. SOLUTION: I have created a MySQL database that will hold all the postings in a table called 'jobs' and have created a PHP form that will post this jobs into the db. PROBLEM: When I go to the PHP form and enter all of the pertinent job information, there is one specific field that will have to have carriage returns/line breaks in it between paragraphs. Everything is working except for this. Is there a way whenever the user presses , that either PHP/MySQL will convert this into a tag only when being displayed in a browser and not in the db?? Can anyone out there please help me with this? I am available off-list as well if it will be easier to pass code back and forth. Any assistance is greatly appreciated! Should you have any questions, comments or concerns, feel free to call me at 318-338-2034. Thank you for your time, Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A == Bayou Internet..(888) 30-BAYOUhttp://www.bayou.com Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net Vicksburg Online..(800) MISSISSIPPIhttp://www.vicksburg.com == Tel: (318) 338-2034ICQ: 38823829 Fax: (318) 323-5053 -- 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 Database 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-DB] Newbie Question
Yes there is: Using a php function called: nl2br() When the data is called from the db and printed to the page use $textdata = nl2br($textdata) This will preserve the enter button being pressed. Regards: Russ On Thu, 08 Nov 2001 09:54:16 -0600 Jay Fitzgerald <[EMAIL PROTECTED]> wrote: > Ok, I am still fairly new at PHP and MySQL also, so please bear with me. > > > TASK: I have a client that wants to have job openings listed on their site > and they want to be able to add, edit and delete the postings themselves. I > would do this in flat-file format but there is the risk of that file size > getting too large and slowing down the server. > > > SOLUTION: I have created a MySQL database that will hold all the postings > in a table called 'jobs' and have created a PHP form that will post this > jobs into the db. > > PROBLEM: When I go to the PHP form and enter all of the pertinent job > information, there is one specific field that will have to have carriage > returns/line breaks in it between paragraphs. Everything is working except > for this. Is there a way whenever the user presses , that either > PHP/MySQL will convert this into a tag only when being displayed in a > browser and not in the db?? > > > Can anyone out there please help me with this? I am available off-list as > well if it will be easier to pass code back and forth. Any assistance is > greatly appreciated! > > > > Should you have any questions, comments or concerns, feel free to call me > at 318-338-2034. > > Thank you for your time, > > Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A > == > Bayou Internet..(888) > 30-BAYOUhttp://www.bayou.com > Mississippi Internet...(800) > MISSISSIPPI...http://www.mississippi.net > Vicksburg Online..(800) > MISSISSIPPIhttp://www.vicksburg.com > == > Tel: (318) 338-2034ICQ: 38823829 Fax: > (318) 323-5053 > > > -- > PHP Database 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] > #---# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam www.theruss.com #---# -- PHP Database 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-DB] Re: Newbie Question
I wrote this cleanup function: function cleanup($copy) { $copy=trim($copy); $copy=htmlspecialchars($copy, ENT_QUOTES); $copy=eregi_replace ("%", "%", $copy); $copy=eregi_replace ("<", "<", $copy); $copy=eregi_replace (">", ">", $copy); $copy=eregi_replace ("&", "&", $copy); $copy=nl2br($copy); $copy=StripSlashes($copy); return($copy); } nl2br converts the carriage returns into or depending on your version of php. So if you want to offer your copy for editing instead of viewing, you might want to run $string=str_replace(", "", $string); The rest of the code removes characters that can be used for malicious coding. You might want to edit it if you want them to enter html code. I also made some functions to access MySQl easier with php: http://zc8.com/zc8/ZC8news/shownews.php?articleid=98 You are welcome to use and modify the code -- PHP Database 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-DB] Newbie Question
>>Hi Kodrik: I just looked at your function and would like to use it myself, but shouldn't the ampersand line: $copy=eregi_replace ("&", "&", $copy); look like this instead? So it matches the other lines that have a symbol replaced by HTML?? $copy=eregi_replace ("&", "&", $copy); Cheers. Russ<< No, because the & sign is needed to represent the ascii values. So I'm actually doing it to put it back where it got converted by htmlspecialchars. If you are going to use it for a forum, you might also be interested by hyperlinkor. It converts urls into links, however they are entered (with a www. or not, httpd or not...) http://zc8.com/zc8/ZC8news/shownews.php?articleid=108 You run your string through this function before displaying. and the links are anchored. Do not run it before entering a string in a database, only before echoing the string. My reply to you was bounced back, so I replied to your message on the list instead. -- PHP Database 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-DB] RE: [PHP] Newbie Question
Ok.I have it working half-way now.here is what I have so far: === PHP FORM ("add_jobs.php" - submits to the script below): === === PHP SCRIPT ("do_addjobs.php" - inserts into db) Duties:"; echo nl2br ($duties); echo ""; ?> === With the way I have this above, when it does "echo nl2br ($duties);" it displays fine now -- thanks for that help so far -- but the problem now (this may be normal, but I am not sure) is when I connect to the db and "select * from jobs;" the db is writing the entries like this: === mysql> select * from jobs; ++--+--++-+-+--+--++--+ | id | position | opendate | salary | appdate | duties | examples | training | skills | benefits | ++--+--++-+-+--+--++--+ | 1 | test | test | test | test| 1 2 3 4 5 6 7 8 9 | test | test | test | test | ++--+--++-+-+--+--++--+ === is this in fact normal? Jay -- PHP Database 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-DB] RE: [PHP] Newbie Question
Jay Fitzgerald wrote: > displays fine now -- thanks for that help so far -- but the problem now > (this may be normal, but I am not sure) is when I connect to the db and > "select * from jobs;" the db is writing the entries like this: > > === > mysql> select * from jobs; > >++--+--++-+-+--+--++--+ > | id | position | opendate | salary | appdate | > duties | examples | training | skills | benefits | > >++--+--++-+-+--+--++--+ > | 1 | test | test | test | test| 1 > 2 > 3 > > 4 > 5 > 6 > > 7 > 8 > 9 | test | test | test | test | > >++--+--++-+-+--+--++--+ > === > > is this in fact normal? Yes. Since you have \n (and possibly \t, others) in the field, mysql is displaying them on the select. b. -- PHP Database 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]