[PHP] Re: an array question

2004-05-20 Thread Torsten Roehr
"Blake Schroeder" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is wrong with whis syntax: > $array = array("$_POST['input_1']","$_POST['input_2']"); You don't need the double quotes: $array = array($_POST[

[PHP] Re: Sessions still do not persist

2004-05-21 Thread Torsten Roehr
uot; SessionID: "; echo session_id(); > $_SESSION['stage'] = 1; > ?> > > > > >echo "Stage:"; echo $_SESSION['stage']; echo " "; > echo " SessionID: "; echo session_id(); echo " "; > echo " Request: "; print_r($_REQUEST); > ?> > As far as I remember session.use_trans_sid does NOT work with forms (action attribute). Have you tried appending it manually to the action?: Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Sessions still do not persist

2004-05-21 Thread Torsten Roehr
"Michael R. Wayne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, May 21, 2004 at 08:04:00PM +0200, Torsten Roehr wrote: > > > > As far as I remember session.use_trans_sid does NOT work with forms (action > > attribute). Have you trie

[PHP] Re: MDB2 and single INSERT statement, prepare+execute or just query?

2004-05-21 Thread Torsten Roehr
always why. Inserts don't happen very > often in my apps so compatibility accross multiple dbs is more important to > me than speed. Finally, is this the right place to ask questions about MDB2, > or is there a more specific group for discussing Pear projects? > Please send you

[PHP] Re: what is the preferred method for outputting HTML?

2004-05-21 Thread Torsten Roehr
ts=>['eenie','minie']), > p, > "What's your favorite color? ", > popup_menu(-name=>'color', >-values=>['red','green','blue','chartreuse']), > p, > submit, >

Re: [PHP] Re: Sessions still do not persist

2004-05-21 Thread Torsten Roehr
"Michael R. Wayne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, May 21, 2004 at 08:35:37PM +0200, Torsten Roehr wrote: > > Sorry, I'm an idiot! The ? was missing: > > > > > > > > Well, I spoke too soon. It d

[PHP] Re: Searching a file

2004-05-22 Thread Torsten Roehr
barray) && in_array('eth0', $subarray)) { echo 'Found eth0 and 1100 in array. Checkbox can be checked'; } else { echo 'Not found'; } } Please try if it works. If so you could change all your foreach() loops to for() loops because you don&#x

[PHP] Re: RSS/RDF generator

2004-05-22 Thread Torsten Roehr
search form - not too much effort, right? http://pear.php.net/package/XML_RSS Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Searching a file

2004-05-22 Thread Torsten Roehr
barray) && in_array('eth0', $subarray)) { echo 'Found eth0 and 1100 in array. Checkbox can be checked'; } else { echo 'Not found'; } } Please try if it works. If so you could change all your foreach() loops to for() loops because you don&#x

Re: [PHP] Re: RSS/RDF generator

2004-05-22 Thread Torsten Roehr
"Electroteque" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > > > You just had to go to pear.php.net and type rss into the search form - not > > too much effort, right? > > http://pear.php.net/package/XML_RSS > > > >

[PHP] Re: concatenating strings

2004-05-22 Thread Torsten Roehr
$message = "My name is " . $myname . " My favorite color is " . $color; > > How do I write it so the email message text is on two lines, > My name is BILL > My favorite color is RED > > Thanks, > Bill Freeburg Hi Bill, this should do the trick: $message = '

[PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
"1"; > $array['a']['b'] = "2"; > $array['a']['b']['c'] = "3"; > $array['a']['b']['c']['d'] = "4"; > > What I need is to be able to somehow print out the

Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
"Richard Davey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Torsten, > > Sunday, May 23, 2004, 6:44:08 PM, you wrote: > > >> $array = array(); > >> $array['a'] = "1"; > >> $array['a'

[PHP] Re: sessions

2004-05-23 Thread Torsten Roehr
Haven't followed this thread yet. Are you using cookies or passing the session id via GET? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: best way to do this with arrays...

2004-05-24 Thread Torsten Roehr
tr($check,0,4)); if ($timestampCheck >= $timestampStart && $timestampCheck <= $timestampEnd) { // do what you want } Haven't tested it. Hope it works for you. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions simply do not work?

2004-05-25 Thread Torsten Roehr
x27;re diving into the PHP core, have you tried using a DB (MySQL) as the container for your session data? You could easily set up a test script with PEAR's DB and HTTP_Session. I'm using this configuration and my provider just upgraded to 4.3.6 - no problems at all. http://pear.php.net/p

Re: [PHP] Re: Customer Session Handlers Using MySQL

2004-05-25 Thread Torsten Roehr
source code. It includes a DB session container: http://pear.php.net/package/HTTP_Session Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: session & HTML target = "_blank" element

2004-05-26 Thread Torsten Roehr
gt; the child page, it doesn't get $_SESSION values. I > have tried to dump variable from $_SESSION and it > shows me the blank array. Does any one know this > strange behaviour?? Let me know if i am doing anything > wrong. Are you using cookies? If not you have to pass the session

[PHP] Re: File Upload within form

2004-05-26 Thread Torsten Roehr
DED TO, > > if($file){ > print("File name: $file_name/n"); > print("File size: $file_size bytes/n"); This should be: if (isset($_FILES) && isset($_FILES['spec'])) { echo 'File name: ' . $_FILES['spec']['name'] . ''

[PHP] Re: clearing new pages

2004-05-26 Thread Torsten Roehr
goodbye > > how do I clear the screen so the end results looks like this: a.php: echo 'hello'; header('location: b.php'); exit; Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Changing variable names in a while loop

2004-05-28 Thread Torsten Roehr
if I put in > $composer$countything that will just output the value of $composer followed > by the value for $countything, but I want it to output the value for > $composer1 if $countything=1 or $composer10 if $countything=10 . Is there > something I can do with variable variables? I co

[PHP] Re: Send HTML/plain text email using PHP

2004-05-28 Thread Torsten Roehr
Maybe you could use a ready-made package such as PEAR's Mail_Mime: http://pear.php.net/package/Mail_Mime Regards, Torsten Roehr "Matt Macleod" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've been having a little trouble configuring a script to s

Re: [PHP] Re: Changing variable names in a while loop

2004-05-28 Thread Torsten Roehr
"I.A. Gray" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks, Torsten. That clears things up quite a bit. I do find the PHP > manual a little heavy going sometimes. Does this mean then that I have to > do this: > $tempcomposer = 'composer&#

[PHP] Re: Mysql Problem

2004-05-28 Thread Torsten Roehr
','PHP') group by > name; You are missing the closing quote here! Please set your error reporting to E_ALL while developing: ini_set('error_reporting', E_ALL); Regards, Torsten Roehr > $mysql_rslt1 = mysql_query($sql, $mysql_bconn) > or die ("Could

Re: [PHP] making selection in drop down

2004-05-28 Thread Torsten Roehr
fault based on the previous search. > > > >Make Selection > $i = 1; > while($row = mssql_fetch_array($result)) > { > $v = $row['loc_id']; > $n = $row['loc_city']; > echo "$n"; > } Try this: while ($row = mssql_fetch_array($result)) {

Re: [PHP] datetime formatting problem

2004-05-28 Thread Torsten Roehr
> > / begin code demo > > > > > > function formatDate($val) > > { > > $arr = explode("-", $val); > > return date("M d, Y g:i A", mktime(0,0,0, $arr[1], $arr[2], $arr[0])); > > } Hi Matt, try this: function formatDate($val)

Re: [PHP] Text file wont' have newlines?

2004-05-29 Thread Torsten Roehr
ine > break in the text. Any suggestions? Try "\r\n" or chr(10): $credit = $userfile_name.': '.$credit1."\r\n"; $credit = $userfile_name.': '.$credit1.chr(10); Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: drop down menu populated from a directory

2004-05-30 Thread Torsten Roehr
; echo '' . $fileName . ''; } } closedir($handle); } // closing select tag goes here Haven't tested it. Hope it works and helps ;) Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Simple calender

2004-05-31 Thread Torsten Roehr
-) Hi Ryan, there is an excellent calendar package in PEAR with good documentation: http://pear.php.net/package/Calendar Here is a simple sample script to build a calendar that can easily be modified: http://pear.php.net/manual/en/package.datetime.calendar.intro-inahurry.php Hope this helps. r

Re: [PHP] Re: PHP Coding Standards

2004-05-31 Thread Torsten Roehr
ally agree with you. I'm coding this way: if (foo) { // code } elseif (bar) { // code } else { // code } This makes it very easy to follow if/elseif/else structures in code. But the PEAR style is the one usually used in Ja

[PHP] Re: Re: drop down menu populated from a directory

2004-05-31 Thread Torsten Roehr
/mov')) { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { $fileName = str_replace('.mov', '', $file); echo '' . $fileName . ''; } } close

[PHP] Re: drop down menu populated from a directory

2004-05-31 Thread Torsten Roehr
e in a browser, it worked! Now what I am hoping to > do is put this menu on a PHP page, and have a qt movie placeholder and > when this menu is used - replace the placeholder with the selected qt > movie... I am just not sure how to do this. This should be easy. Please post your QT placeholder (HTML) code. Then we can help. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: drop down menu populated from a directory

2004-06-01 Thread Torsten Roehr
27;nameOfYourSelectBox'])) { // placeholder code } Set your embed src-tag to: src="../../../mov/" So if you submit your select box the selected movie should be shown. Maybe you can omit the width and height attributes. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Can session.save_path data be saved to a database instead of a file system?

2004-06-02 Thread Torsten Roehr
hp.net/package/DB http://pear.php.net/package/HTTP_Session Just set those two packages up, create a session table (see HTTP_Session/Container/DB.php for the schema) and set this HTTP_Session option: HTTP_Session::setContainer('DB', array('dsn' => $dsn, 'table' => &

[PHP] Re: PHP and HVCI

2004-06-03 Thread Torsten Roehr
Hi, google for 'php pear hbci'. You'll find some useful sites. Regards, Torsten Roehr "Arndt Touby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > does anybody have an idea how to implement HBCI-functionality to a PHP-Site? > &

[PHP] Re: Call JS Function with PHP Header()?

2004-06-03 Thread Torsten Roehr
:this.print()"); > > Which of course does not work. Anyone know how I might do it? > > Many thanks... > -- > Nick W Hi Nick, try this: echo " <!-- this.print(); //--> "; You have to put it into a valid HTML page. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP & User Interface

2004-06-05 Thread Torsten Roehr
roller There is also a Validate class for checking all types of input values: http://pear.php.net/package/Validate Of course it will take some time to get into it but will save you a lot of time in future projects. Hope this helps! Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: 2 Websites on 1 url

2004-06-06 Thread Torsten Roehr
for the dutch website. > > I know there is some javascript to do this, but hey ! Who wants to use that > ? > > Can anyone help me out with this one ? This was discussed earlier today in another thread. Go to the list archive and look out for "Multiple URL Redirection":

[PHP] Re: dynamically build array from db

2004-06-08 Thread Torsten Roehr
extRecord()){ // figure out how to get $title and $page from your record set (do didn't say which DB layer you are using) $array[$title] = $page; } Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Expedia.com

2004-06-09 Thread Torsten Roehr
ubmit form to page 2 page 2: load screen (don't start processing), forward search keywords to page 3 page 3: start processing I hope you get my point. Regards, Torsten Roehr "René fournier" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] When Expedia.com is

[PHP] Re: Undefined index ???

2004-06-09 Thread Torsten Roehr
> > #error## > Notice: Undefined index: user_status in > /var/www/itmdata/include/include.php on line 13 Did you really set it to null?: $_SESSION['user_status'] = null; ? Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Refresh a frame?

2004-06-09 Thread Torsten Roehr
#x27;; I think you can also use the frame name: parent.myFrame.location.href = 'index.html'; Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Refresh a frame?

2004-06-09 Thread Torsten Roehr
> How would I do that in the PHP block? Please always answer to the list. Just echo out the JS statement: echo ' <!-- parent.frames[0].location.href = "index.html"; --//> '; Regards, Torsten > > > "Robert Sossomon" <[EMAIL PROTECTED]> wrot

[PHP] Re: Undefined index ???

2004-06-09 Thread Torsten Roehr
"Michael Jonsson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > No, it's not set to NULL it just emty... Empty means: $_SESSION['user_status'] = ''; or $_SESSION['user_status'] = 0; Not setting it does NOT mean it's empt

Re: [PHP] Undefined index ???

2004-06-09 Thread Torsten Roehr
not exist > > if ( isset ( $_SESSION['user_status'] ) ) { > echo ( $_SESSION['user_status'] ); > } > > Or any combination of the three. I would not recommend turning down the error reporting level. This might lead to unexpected behaviour in your applicati

[PHP] Re: Limit number of characters in a string

2004-06-11 Thread Torsten Roehr
o just the first 100 characters. http://de2.php.net/manual/en/function.substr.php Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: passing a function as a parameter

2004-06-11 Thread Torsten Roehr
tion itself: function a() { echo "a"; } function b($func) { call_user_func($func); echo "b"; } b('a'); Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: nested statement problem

2004-06-11 Thread Torsten Roehr
t "additional information"; } > > // Everything works except this nested if statement - No php error, it > just doesn't display the information > > print ""; > } else { print "other information if false"; } If it doesn't execute your code th

[PHP] Re: addslashes

2004-06-11 Thread Torsten Roehr
to never have to use the addslashes() function. Any > suggestions? See here: http://de.php.net/addslashes Pay attention to the notes on magic_quotes. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Password protected downloads

2004-06-13 Thread Torsten Roehr
d to the user: http://pear.php.net/package/HTTP_Download Hope this helps. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: converting a char variable to an int?

2004-06-14 Thread Torsten Roehr
work as a PHP string with your DB. Could you post your INSERT/UPDATE statement? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Load 2 Frames (possibly OT)

2004-06-14 Thread Torsten Roehr
s going to have to be a javascript, but even that I > haven't found the code for yet. > > Any thoughts? > > My current code is: > header("parent.C.location.href = > \"show.html\";"); > header("parent.B.location.href = > \"custn.html\&q

[PHP] Re: referencing an existing object

2004-06-15 Thread Torsten Roehr
ass - just use the passed $db object in your method: class myotherclass { var $db; function myotherclass(&$db) { $sql = 'select * from mytable'; $db->dosql($sql); } } Another way is to declare the $db variable global in your methods so that it i

[PHP] Re: Unit Testing

2004-06-15 Thread Torsten Roehr
g. Anyone have any experience with any of these libraries, or have any > comments on PHP Unit testing in general? Don't have any experience myself but here's a nice article by Harry about SimpleTest: http://www.sitepoint.com/blog-post-view.php?id=175190 Hope it helps. Regards, Torsten

[PHP] Re: referencing an existing object

2004-06-15 Thread Torsten Roehr
ould be passed into every method. It > should be passed into the constructor and assigned as a class variable > (as my code above shows). Then, any method in the object can get to it. You're right, Justin. What you suggested seems to be the best way. I'll be adding var $db to my Base class and pass the db object to the constructor. Thanks and regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Excel files with multiple sheets

2004-06-15 Thread Torsten Roehr
. I can do a single file, but > was looking for something a little more powerful before I try to create > my own. No sense in re-inventing the wheel... Hi Robert, have you looked at PEAR's Spreadsheet_Excel_Writer?: http://pear.php.net/package/Spreadsheet_Excel_Writer Regards, Torsten

[PHP] Unexpected behaviuor with __CLASS__

2004-06-16 Thread Torsten Roehr
alling the method - in my case test2. Any ideas? Thanks and best regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sending email with php

2004-06-16 Thread Torsten Roehr
>"Phpu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >Hi, >How can i send email in php usig the smtp server? I'm looking for a tutorial or a good script. Take a look at PEAR's Mail package: http://pear.php.net/package/Mail Regards, Torsten Roehr

Re: [PHP] Unexpected behaviuor with __CLASS__

2004-06-16 Thread Torsten Roehr
"Robin Vickery" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 16 Jun 2004 11:49:31 +0200, Torsten Roehr <[EMAIL PROTECTED]> wrote: > > > > Hi list, > > > > on RedHat with PHP 4.3.6 the following code produces '

[PHP] Re: PHP & MySQL DATE comparison

2004-06-16 Thread Torsten Roehr
one > please help with this quick question. You could convert it to a timestamp via strtotime() and check it against time(): $date = strtotime($dateFromDb); if ($date < time()) { echo 'Date is in the past.'; } Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Value in URL issue

2004-06-16 Thread Torsten Roehr
his a > globals issue of some sort? Try accessing it via $_GET['page']. You can always do a print_r($_REQUEST) to see which variables are available. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PDF Templates with PHP

2004-06-17 Thread Torsten Roehr
lar) then get the file contents with get_file_contents() or fopen() and replace the placeholders with their values with str_replace(). Hope it helps. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] This weird behavior is killing

2004-06-18 Thread Torsten Roehr
gt; there are several workarounds, like out them in a common folder, and add > > it to the include_path either directly in php.ini or using ini_set(), > > but that would be a real pain in the arse ... > > > > solutions ? > > > > regards, > > idss > > Before anyone asks me, yes, the behaviour is the same even with the use > of include_once ou require_once =) The only workaround I see is using a full system path. You could define it in a config file as a constant: define('DIR_INCLUDE', '/path/to/your/file/'); Then use it in your scripts: include_once DIR_INCLUDE . 'file.php'; include_once DIR_INCLUDE . 'file2.php'; HTH, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] " in data

2004-06-18 Thread Torsten Roehr
ntered this before, and have a way to patch it? >[/snip] > >Yes, we have all encountered it. You need to escape the " character and >other characters as well. Start here > >http://www.php.net/addslashes > >The manual is your friend Another way is to convert the quotes to &quo

[PHP] Re: Send a page using mail()

2004-06-28 Thread Torsten Roehr
me to send HTML emails: http://pear.php.net/package/Mail_Mime Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: clearing font tags

2004-06-28 Thread Torsten Roehr
l/result pages? > > Any help would be greatly appreciated Hi Chris, take a look at strip_tags(): http://de2.php.net/manual/en/function.strip-tags.php You can define which tags should NOT be stripped from the supplied string. Regards, Torsten Roehr -- PHP General Mailing List (http:

[PHP] Re: Date Diff function

2004-06-28 Thread Torsten Roehr
ds that which "date" supports on our server. > > Best regards, Hi Richard, take a look at PEAR's Date package: http://pear.php.net/package/Date Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mail program

2004-06-28 Thread Torsten Roehr
lease search the mailing list archive at: http://marc.theaimsgroup.com/?l=php-general This question is being asked (and answered) frequently. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP, Classes, Sharing Code

2004-06-28 Thread Torsten Roehr
var $albums = array(); } class Album { var $albumID; var $portfolioID; var $photos = array(); } class Photo { var $photoID; var $albumID; var $name; } Just my 2c. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Concatenate PHP code into a string

2004-06-28 Thread Torsten Roehr
d the value is your value to insert. Then you could just do: $values = array('field1' => 'myValue', 'field2' = 25); $query = 'INSERT INTO table SET '; $set = ''; foreach ($values as $column => $value) { $set .= (empty($set)) ? "$column = '$value'" : ", $column = '$value'"; } $query .= $set; ... Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Works in Mozilla, not in IE

2004-06-28 Thread Torsten Roehr
t several options for various header commands: http://pear.php.net/package/HTTP_Download Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Torsten Roehr
)) 3. output as HTML (into the form elements) 4. get POST data 5. escape POST data and insert into DB again Hope this helps. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Torsten Roehr
"Justin Patrin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 30 Jun 2004 19:02:50 +0200, Torsten Roehr <[EMAIL PROTECTED]> wrote: > > > > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROT

Re: [PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Torsten Roehr
>"Chris W. Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]>01.ati.local... >Torsten Roehr <mailto:[EMAIL PROTECTED]> >on Wednesday, June 30, 2004 10:03 AM said: > >> 1. get data from DB >> 2. convert for valid HTML output

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Torsten Roehr
ack but failed as chr() only supports > a Charset of 255 Characters ( which most languages don't match eg > ru, pl, ch, jp ... ) > > So my question is if anyone on this list has an idea on how to retrieve > the data completely? Some kind of func_ConvertFromHTML() function. Is this what you're looking for?: http://de2.php.net/manual/en/function.html-entity-decode.php Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Torsten Roehr
orm elements? > > [...] > > Is this what you're looking for?: > > http://de2.php.net/manual/en/function.html-entity-decode.php > [...] > > [quote](PHP 4 >= 4.3.0, PHP 5)[/quote] > > This won't work on most servers we're hosting our CMS on :-/

Re: [PHP] Is PEAR worth the effort?

2004-06-30 Thread Torsten Roehr
ode > for extra flexibility and such. For the moment, PEAR and PEAR_Error > remain, but IMHO they are very useful. For more discussion (read holy > wars) look at the PEAR and PHP list archives. Justin said it all. Just want to put my vote in for PEAR. Give it a try, you will not regret it. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Torsten Roehr
. either those 1/4... symbols or > the good ol '' ... not sure in which kind formated the data was > returned :-) Does the data look correct in the database? Have you tried browsing the table with phpMyAdmin? Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting strings to match multiple charsets

2004-07-01 Thread Torsten Roehr
data through htmlentities()? What does the source code say of the characters outside of the forms and inside the forms? Could you maybe post some chars? Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Help ASAP

2004-07-01 Thread Torsten Roehr
e: http://de.php.net/function.shell-exec Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Redirecting a user

2004-07-01 Thread Torsten Roehr
"Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Please could someone tell me how I can redirect a user to the page they came > from including any query strings attached to the URL? header('location: ' . $_SERVER['REQUEST_URI

[PHP] Re: I'm very curious about the object-orientated thingies in PHP 5.....

2004-07-01 Thread Torsten Roehr
server is one sided in communication or one way, not both way? Hi Scott, a bit of self-research shouldn't be too hard: http://zend.com/php5/index.php Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTTP_AUTHORIZATION question

2004-07-02 Thread Torsten Roehr
nks - I suppose I was thinking of building (via PHP) and client JS script > to set the property at the client. But anyway the offline way is the > answer - shold have thought of that. > Alan Hi Alan, check PEAR's HTTP_Download for serving files for download from a protected directory: http://pear.php.net/package/HTTP_Download Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Reference Scripts: Imaging Database, Recursion, Age Validation, Reg Ex

2004-07-02 Thread Torsten Roehr
p;t=14 > > Regular Expressions (Finding links in Web Code/ Gallery Image Ripper): > http://www.dailymedication.com/modules.php?name=Forums&file=viewtopic&t=13 > > They all have working demos except for the Imaging Database stuff. Hope > these can help somebody. Plan to be adding mor

[PHP] Re: Uploading multiple files

2004-07-02 Thread Torsten Roehr
ded. "; >print "Here's some more debugging info:\n"; >print_r($HTTP_POST_FILES); > } else { >print "Possible file upload attack! Here's some > debugging info:\n"; >print_r($HTTP_POST_FILES); > } > print ""; > ?> > > I keep on getting a possible upload file attack. The > debugging info says there are no errors. I have tried > using $_FILES instead of $HTTP_POST_FILES. My ISP has > Gobals turned on and max file size is 8 MB, in this > example I have been using 2 files of 246K each. > > Where do you think the problem might lay? > > Thank you, > Gennaro Losappio How do you know you are getting upload attacks? Any symptoms? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session id changing all the time on some pc's

2004-07-02 Thread Torsten Roehr
ranets where you know the infrastructure you are dealing with. Passing the session id via GET/POST may be ugly but makes you independent of the browser's cookie settings. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session id changing all the time on some pc's

2004-07-02 Thread Torsten Roehr
gt; >> accepts > > those cookies. I turned 'accept ALL cookies'. Same result.. > >> > >> Maybe ... this could be a domain problem.. > >> > >> The only thing i want to know is all the truth about IE (6?) and cookies > > :) > >> > &

Re: [PHP] session id changing all the time on some pc's

2004-07-02 Thread Torsten Roehr
> > > Could you describe the last paragraph a bit more in detail? Thanks in > > advance! > > > > Torsten > > What if you used this? > > session_start(); > $_SESSION['sid']=session_id($HTTP_GET_VARS['sid']); > > Now as long as each o

Re: [PHP] session id changing all the time on some pc's

2004-07-02 Thread Torsten Roehr
) just assign > > it > >> >> to $_SESSION and pass that around. Then it'll stay transparent to the > >> >> user. > >> > > >> > Could you describe the last paragraph a bit more in detail? Thanks in > >> > advance! > >&

Re: [PHP] session id changing all the time on some pc's

2004-07-02 Thread Torsten Roehr
n_start() is used. > > > > OK, but HOW do you manage that the user stays in the current session. > Usually this is made sure by passing the session id around. But > obviously > > you are not doing this, are you? > > > > Torsten > > > > As long as the

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
"Zilvinas Saltys" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 2 Jul 2004 22:45:23 + > Curt Zirzow <[EMAIL PROTECTED]> wrote: > > > * Thus wrote Torsten Roehr: > > > "Zilvinas Saltys" <[EMAIL PROTECTED]> wro

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
option...that sucks. > > Sorry dude. Hi Matthew, there's no reason to apaologize. I would have loved to see a non-cookie solution with transparent session id use. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session id changing all the time on some pc's

2004-07-03 Thread Torsten Roehr
"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Zilvinas Saltys" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Fri, 2 Jul 2004 22:45:23 + > > Curt Zirzow <[EMAIL PROTECTED]> wrote:

[PHP] Re: MySQL Results Not Being Commited To Database

2004-07-03 Thread Torsten Roehr
sql); And you don't need quotes here: mysql_select_db ("$dbase"); => mysql_select_db($dbase); Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread Torsten Roehr
> Torsten > > I managed to work through it and this is the code: > > $NewUserID=$_POST['TXT_UserID']; > $NewUserPassword=$_POST['TXT_UserPassword']; > $NewUserComments=$_POST['TXT_

Re: [PHP] RE: MySQL Results Not Being Committed To Database

2004-07-03 Thread Torsten Roehr
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> $query = mysql_query($sql); > >> $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid > >>Query - " . mysql_error()); > > You're running the query twice. Take out that first line. Michael, that's where y

[PHP] Re: User Logon Procedure Fails

2004-07-04 Thread Torsten Roehr
{ >$sql = "SELECT UserID FROM RegisteredMembers > WHERE UserID='$_POST[TXT_UserID]' > AND password=UserPassword('$_POST[TXT_UserPassword]')"; You already have the user id ($_POST[TXT_UserID]), so why select it? Regards, Torsten >$r

[PHP] Re: make an image disappear when page loads

2004-07-05 Thread Torsten Roehr
ith POST or via PHP's header and GET) page 3: processing of form data Page 2 will be shown as long as page 3 is processing the data. When page 3 has finished processing the data and started output page 2 will disappear. Is this what you are looking for? Regards, Torsten Roehr -- PHP General

[PHP] Re: quick newbie q: mysql_insert_id()

2004-07-05 Thread Torsten Roehr
seem to work if the object is PEAR, and > the PEAR docs don't seem to show the same function. Please search the PEAR general mailing list archive. This question is being asked (and answered) frequently: http://marc.theaimsgroup.com/?l=pear-general Regards, Torsten Roehr -- PHP General

[PHP] Re: Form Submission

2004-07-06 Thread Torsten Roehr
d... > > Thanks for your help Check the $_POST superglobal: if (isset($_POST['name_of_your_button'])) { } Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   >