Re: [PHP-DB] Need some help please!

2004-02-20 Thread Mikael Grön
Hi. First of all it's never a good idea to use ? instead of ?php. But anyway. Your loss. ;) You will need to do a refresh of the page to be able to run an insert query. The refresh will need to be made by the JavaScript and since I've refused to learn JavaScript, I can't help you with

Re: [PHP-DB] INSERT dynamic values problem - Need help urgently!

2004-02-27 Thread Mikael Grön
Irin, First of all, you need to do this instead of what you're doing: while ($row = mysql_fetch_row($sql)) Second, this value should be storable just as any other values. i.e. mysql_query(insert into database (table) values(' . $_POST['class_code'] . ')); I hope this helps you a bit. Regards,

Re: [PHP-DB] supplier - consumer website scripts available?

2004-03-07 Thread Mikael Grön
Denis, Go have a look at www.hotscripts.com. They've got all kinds of ready-made systems for different combinations of programming languages and database solutions. Good Luck! Mikael On Mar 06, 2004, at 17:01, Denis L. Menezes wrote: Hello friends. I am in a hurry to make a website where

[PHP-DB] quotations in value field

2004-04-14 Thread Mikael Grön
Hey people! I have a problem with an email form of mine. I want the user to be able to preview his message before sending it off to the hundreds of subscribers. Problem is, if there's one or more double quotes () in the subject (for which I use an input text field) it gets f*cked up. Example:

Re: [PHP-DB] quotations in value field

2004-04-14 Thread Mikael Grön
Well, I guess a combination of htmlspecialchars and some other function to convert it back, before it gets sent of in the _plain text mails_. Thanks for the help dude! Mike On Apr 14, 2004, at 15:14, H-Mac Moderator wrote: Mikael- I suspect you want htmlspecialchars, Not stripslashes. See:

Re: [PHP-DB] quotations in value field

2004-04-15 Thread Mikael Grön
On Apr 14, 2004, at 15:33, Ford, Mike [LSS] wrote: On 14 April 2004 15:21, Mikael Grön wrote: Well, I guess a combination of htmlspecialchars and some other function to convert it back, before it gets sent of in the _plain text mails_. You don't need to convert it back -- that happens

Re: [PHP-DB] New To PHP

2004-04-15 Thread Mikael Grön
What I did to learn PHP was to surf to http://www.hotscripts.com/ and look at other peoples code. Writing it yourself looking at the hotscript codes also helps you understand the logic of it. Mike On Apr 15, 2004, at 12:53, Tom Cloyes wrote: I ma trying to learn PHP and am having difficulty

Re: [PHP-DB] Re: finding data

2004-04-15 Thread Mikael Grön
The way I would do it: $result = mysql_query(select * from bivalues WHERE myvalue - '$zchar'); if (mysql_num_rows($result) { echo Result 2 - found it; } else { echo Not found; } This leaves you with the option to start processing the data as soon as error checking is over. Using

[PHP-DB] PHP vs. Flash

2004-04-16 Thread Mikael Grön
I'm not sure this post really belongs in this list, but I'll give it a try anyway.. Anyone who's ever worked with PHP (or any other serverside scripting language) vs. Flash has probably had his/her share of problems with passing variables back and forth between the two. Most of the time that

Re: [PHP-DB] Occasional css/javascript errors using IE6: variables in url

2004-04-16 Thread Mikael Grön
My guess is that it's IE problem. I've had problems with CSS not loading when it should and stuff like that with IE as well. Try using other browser. I always make sure to have a version of Netscape installed. Now that I run on an iBook (OS X 10.3.2) I have IE, Safari, Camino and Netscape

Re: [PHP-DB] Looping through a result

2004-04-20 Thread Mikael Grön
Rene, This is a clarification of what I think Ignatius was talking about. I did like this on www.deep-purple.com/tourdates: Your database structure must look something like this for it to work: ID ITEMCATEGORY 1 1 1 2 2 1 3 3

Re: [PHP-DB] login script

2004-04-27 Thread Mikael Grön
Here you go: Table: ID Login PW Admin 1 admin abc123 1 2 normal bcd234 0 3 normal2 cde345 0 PHP: [BOF] ?php if($_POST['login']) { $result = mysql_query(select * from users where login = ' . $_POST['login'] . ') or die(mysql_error()); if

Re: [PHP-DB] login script

2004-04-27 Thread Mikael Grön
Err... As usual I forgot the most important part... Add session_start() just above the if($_POST['login']) { row, or it won't work at all.. ;) Or rather, it'll work, but no sessions will be saved. Mike On Apr 27, 2004, at 08:48, Mikael Grön wrote: Here you go: Table: ID Login PW

Re: [PHP-DB] Session

2004-04-27 Thread Mikael Grön
Session objects has nothing to do with weak network connections. If your sessions gets un-set, it's most probably because you forgot the session_start(); command in the beginning of some file that is using sessions. Without that line, no sessions will be neither stored nor read. Mike On Apr

Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Mikael Grön
As Uzi and Viorel already pointed out, use GET or POST instead of PUT. Also, to be certain of the redirect, use: ?php header(Location: page3.php); exit; ? instead of the meta redirect. First of all, I'm sure there are browsers that don't support META redirects, secondly, using the PHP header

Re: [PHP-DB] converting scripts for register_globals=Off

2004-04-29 Thread Mikael Grön
wrote: even better: $_REQUEST['variable_name'] so that you don't have to bother checking both depending on whether your form was GETted or POSTed. _ - Original Message - From: Mikael Grön [EMAIL PROTECTED] To: Kim Jacobs (Crooks) - Mweb [EMAIL PROTECTED]; [EMAIL

[PHP-DB] Re: [PHP-WIN] Re: [PHP-DB] $_POST[mypassword]; ***Undefined index: mypassword

2007-05-15 Thread Mikael Grön
Simple. A resource, like the stuff you get when running mysql_query for instance ($resource = mysql_query($sql);) cannot be stored in a session variable. When you go to a new page, the resource variable is no longer linked to the results of the mysql query and thus wasn't stored. You