Re: [php-list] image download

2008-11-04 Thread Patrick Bierans
> i have number of jpg images. I want to store these images in > mysql,retreive on webpage, then to download the particular image whom > visitor click. Never store binary data in a database if you can avoid it. There are a lot of reasons. The most important ones: Space requirement (mysql has to en

Re: [php-list] How to Validate for E-Mail Address?

2008-10-18 Thread Patrick Bierans
Hi Diane > What specific code would I have to add to make my contact form only > accept an E-Mail Address where it is asked for? Right now it will > accept anything: > > http://dkjwebs.com/contact.php There are many ways to do it. I'd say: keep it simple. If som

Re: [php-list] Simple PHP Syntax Question

2008-10-15 Thread Patrick Bierans
> > echo ' href="http://www.joshuane il.com/hir/ scripts/results/ > '.$fdf_file, '>click > here to download Non_Disclosure Agreement '; > It's a simple typo. After $fdf_file write a "." dot and not a "," colon. And of course you missed the closing "

Re: [php-list] Help Needed : related to OCR

2008-10-14 Thread Patrick Bierans
Hello aslam doctor, > I am currently trying to develop a code for Optical character recognition. Fist advice: Switch to another coding language. php is not designed for this. Go for a language like java where you can write real applications with. Second advice: Do not cross-post in different l

Re: [php-list] MySql problems

2008-10-11 Thread Patrick Bierans
> $sql = "SELECT u_name FROM members WHERE u_name = {$uid}"; in general this should be the correct way: $sql = "SELECT u_name FROM members WHERE u_name = ".$uid; if you are paranoid you should go for typecasting: $sql = "SELECT u_name FROM members WHERE u_name = ".(int)$uid; if you are paranoid

Re: [php-list] mysql LIMIT / COUNT

2008-10-11 Thread Patrick Bierans
[EMAIL PROTECTED] schrieb: > > Hi all, > > I have a quick question. > > If I am getting a small range of results using the mysql LIMIT > function then how can I tell how many results there would have been > if I didn't use LIMIT with the same query? > > Thanks. > use a "select count(*)" without th

Re: [php-list] Rolling Road Log

2008-09-26 Thread Patrick Bierans
> if ( !function_exists('file_put_contents') && !defined('FILE_APPEND') ) > { > define('FILE_APPEND', 1); > function file_put_contents($n, $d, $flag = false) > { > $mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? > 'a' : 'w'; > $f = @fopen($n, $mode); >

Re: [php-list] Assigning Variables from preg_match arrays

2008-09-24 Thread Patrick Bierans
> If I have vendors that give me tire sizes in the following different formats: > > 215 45 17 > 215/45/R17 > 215/45ZR17 > 2154517 > > I really prefer the tire sizes to be formated as a single number ie: 2454517 > > What I have done so far is: > > $string = '245/45ZR17'; > $tiresi

Re: [php-list] Rolling Road Log

2008-09-24 Thread Patrick Bierans
Bob schrieb: > I used to use the following to log specific errors: > $log = 'rejected'; > if (filesize($log) > 2) unlink($log); > $data = date('d-m-Y H:i:s')." [$fault]\r\n"; > error_log($data,3,$log); > ?> > But, this meant that sometimes there would only be a few errors shown, if the > file

OT: Re: [php-list] list test

2007-01-29 Thread Patrick Bierans
Bob wrote: > Hi Patrick, > > You helped me a lot in my early stages of learning php. > Regards, Bob Exton. > Ah, Hi Bob - I remember. ;) That's because now I am working as a pro and nearly have no more time. ;) But I still read this list. PHP is now clear to me - I'm heading for mysql at freak

Re: [php-list] list test

2007-01-27 Thread Patrick Bierans
works

Re: [php-list] Re: Dynamic 'Next' and 'Previous' buttons

2006-08-08 Thread Patrick Bierans
> I think u should use AJAX. ... and what for? necrotic72, you can use POST as simple as GET. ;) if you prefer it less stupid you can check which button was pressed to submit the form... and in your php script you do something like: $pa

Re: [php-list] Mysql Insert Problem

2006-07-17 Thread Patrick Bierans
please (!) be paranoid and use mysql_real_escape_string() on every variable you are inserting into a mysql command! example: function save_record($table,$data,$fieldlist) { $fieldlist=preg_replace("/[^A-Za-z0-9_]+/"," ",$fieldlist); $fields=preg_split("/[ ]+/",trim($fieldlist)); $sql="ins

Re: [php-list] www in URL

2006-07-04 Thread Patrick Bierans
you can redirect with location('header:') if $_ENV['HTTP_HOST'] does not start with "www." try something like: if (isset($_ENV['HTTP_HOST']) && substr($_ENV['HTTP_HOST'],0,4)!='www.') header('location: http://www.'.$_ENV['HTTP_HOST']); of course it is much cleaner to configure the host direct

Re: [php-list] Foreach question

2006-07-02 Thread Patrick Bierans
Hi Wade > foreach ($_POST as $nkey => $new){ > foreach($olddata as $okey => $old) { > if ($new == $old) { > print '"'.$new.'" AND "'.$old.'" are the SAME; > Next... '; > } else { > print '"'.$new.'" AND "'.$old.'" are the DIFFERENT; Next... />'; > } > } > } that was close ;) if (is_array($_POS

Re: [php-list] Replacing tabs with |'s

2006-05-16 Thread Patrick Bierans
>  str_replace('/\t/', '/|/', $input_file); /something/ is preg_replace() and too much;) '\t' will not be interpreted. But "\t" will. ;) str_replace("\t", '|', $input_file); Community email addresses:   Post message: php-list@yahoogroups.com   Subscribe:    [EMAIL PROTECTED]   Uns

Re: [php-list] Header - Location - & META refresh

2006-05-15 Thread Patrick Bierans
> > Virtual Consultancy Home Page >
>
> > > > http://www.v-consult.co

Re: [php-list] pseudo BBcode: [url] etc

2006-05-15 Thread Patrick Bierans
> How do I parse the above string so that the result replaces the [url] > parts with the appropriate HTML? regular expressions do the job ;) http://php.net/preg_replace something like this (untested): $content=preg_replace("/\[url\]([^\[]+)\[/url\]/"," href=''>$1',$code); Community e

Re: [php-list] PASSING VARIABLE FOR DELETE RECORD

2006-04-24 Thread Patrick Bierans
> I made little guest book application, and options are add, view and now I > want to delete a record I put the delete link on every record, now here > I'm stuck how to pass the record variable to the delete.php file.   if (isset($_REQUEST['id']) && (int)$_REQUEST['id']>0)   {     $id=(int

Re: [php-list] Displaying pics without URL ?

2006-04-24 Thread Patrick Bierans
> Is there a way for a PHP script to display / show a picture, while hiding > the URL of the actual picture ? You can use something like: showpicture.php?id=1231   include('myfunctions.php');   $file=get_url_for_image_to_this_id($_REQUEST['id']);   $ext=end(split("\.",$file));   header('con

Re: [php-list] How to remove   from the string

2006-04-19 Thread Patrick Bierans
> I want to remove the " " from the string use htmlentities() in reverse Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo

Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread Patrick Bierans
> the only character I can't put into the line to be removed or replaced is > ' it makes an error either write "'" or escape it with a backslash: '\'' ;) Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED]

Re: [php-list] Request for PHP code adjustment

2006-04-04 Thread Patrick Bierans
> // $undrscrs=array("__","___","","_","__"); easier: $txt=preg_replace("/[_]+/","_",$txt); [Non-text portions of this message have been removed] Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED]

Re: [php-list] Help with very simple problem

2006-03-31 Thread Patrick Bierans
Hi Wretha! > What I would like to ADD to that is to also remove any charactors that > isn't reproduced well in HTML, things that may make the URL not work such > as: > ! ? ( ) @ # " / \ + = . , & * - ~ ` Use regular expressions via preg_replace() - something like: $title=preg_replace("/[\!\?\(

Re: [php-list] Is this code for right click options possible in PHP ?

2006-03-22 Thread Patrick Bierans
always keep in mind: there are clientside and serverside techniques. ;) - Original Message - From: Chris To: php-list@yahoogroups.com Sent: Tuesday, March 21, 2006 5:35 PM Subject: RE: [php-list] Is this code for right click options possible in PHP ? Many, many thanks for t

Re: [php-list] Check file size before upload?

2006-02-13 Thread Patrick Bierans
> Is there any way to check file size before upload? answer: no way tell the user the upload limit MAX_UPLOAD_SIZE if they are too stupid to read it is not your fault. ;) you could try to write a java applet for upload which might be able to check before upload. accessing files on the client

Re: [php-list] Read a file below root

2005-12-12 Thread Patrick Bierans
Have you tried to start with a slash at start like "/test.php"? Should point to root. - Original Message - From: "Bob" <[EMAIL PROTECTED]> To: Sent: Monday, December 12, 2005 12:43 AM Subject: Re: [php-list] Read a file below root >I can read a file below the root directory ok, by usin

Re: [php-list] passing an array via $_GET

2005-12-06 Thread Patrick Bierans
Use session management for this! Passing in $_GET is no good, there is a hard limit in length! If you really have to do this you can use serialize() for converting arrays to strings. - Original Message - From: "Bob Sawyer" <[EMAIL PROTECTED]> To: "PHP List" Sent: Tuesday, December 06,

Re: [php-list] Two Questions for PHP/MySQL Experts

2005-12-03 Thread Patrick Bierans
both in the same way: "; } // each row ?> - Original Message - From: "imran shafiq" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; ; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; ; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, December 03, 2005 11:23 AM Su

Re: [php-list] Refreshing page problem

2005-12-03 Thread Patrick Bierans
you can use and additional: window.setTimeout('window.location="index.php?someparams";',1) and as always: don't thrust javascript being turned on. - Original Message - From: "valentin" <[EMAIL PROTECTED]> To: Sent: Saturday, December 03, 2005 3:59 AM Subject: [php-list] Refreshi

Re: [php-list] Re: Form submit

2005-12-02 Thread Patrick Bierans
sure. as long as logic comes before output you can output "file" content by using header() and piping the file's content. - Original Message - From: "Gurudatta Raut" <[EMAIL PROTECTED]> To: Sent: Friday, December 02, 2005 8:24 AM Subject: Re: [php-list] Re: Form submit > > Is it possi

Re: [php-list] Re: Form submit

2005-12-01 Thread Patrick Bierans
in this case the code gets not executed at all. look out for comments or includes - Original Message - From: "viewcharts" <[EMAIL PROTECTED]> To: Sent: Thursday, December 01, 2005 9:34 PM Subject: [php-list] Re: Form submit >> place a print_r($_REQUEST) in front of the switch{} - are y

Re: [php-list] Re: Form submit

2005-12-01 Thread Patrick Bierans
> For some reason the code isn't printing the stuff in the case > statements. place a print_r($_REQUEST) in front of the switch{} - are you getting expected data? Yahoo! Groups Sponsor ~--> 1.2 million kids a year are victims of human trafficking.

Re: [php-list] Re: Form submit

2005-12-01 Thread Patrick Bierans
I don't understand. You decide which actions you want to perform. you can link one button to more than one action. >> switch ($action) >> { >> case 'chat': >> perform_action_chat($_REQUEST); >> break; >> case 'default': // next >> default >> perform_action_default

Re: [php-list] Removing newline

2005-12-01 Thread Patrick Bierans
try this: $str=str_replace("\r","",$str); $str=preg_replace("/\n([^n]+)/","$1",$str); Yahoo! Groups Sponsor ~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/HKFolB/TM --

Re: [php-list] Form submit

2005-12-01 Thread Patrick Bierans
> No. (Add more "o"'s for dramaturgic delay effects like in cliffhanger) is a lot better! Don't mix $_POST and $_GET. And if you have different pages/actions you might want to go with this technique: and in code you use: If you use an array for $_REQUEST['action'] you do not have

Re: [php-list] Re: Uploading a file and stripping things from the file name

2005-08-12 Thread Patrick Bierans
> have you looked at the manual? http://www.php.net/copy has pretty much > everything you need to know is there... Sorry, but copy() is the wrong function for that. Better use moveuploadedfile() for security reasons: http://php.net/move-uploaded-file Yahoo! Groups Sp

Re: [php-list] Max length of a var

2005-08-12 Thread Patrick Bierans
> Not sure how this will come out, but here's an example: > $HassomethingwonderfulhappenedinyourbusinesssinceyoutookthisseminarorreadtheebookIwouldappreciatehavingyourtestimonialOfcourseincludeyourwebsitesothatIcanmentionitinmymaterials." They sould have replaced spaces by underscore to make it mo

Re: [php-list] Max length of a var

2005-08-12 Thread Patrick Bierans
> > Can you same some? > Yes I could. Is this one of your jokes? Why, would you like some? Just for understanding how some people code. Sometimes you can learn something out of it. If not, it's for entertaining. ;) Yahoo! Groups Sponsor ~--> http

Re: [php-list] Max length of a var

2005-08-12 Thread Patrick Bierans
No info on php.net but here is a quote from http://www.smartwebby.com/PHP/variable.asp < Limitations in Variable Naming: PHP has no limit < on the length of variable name as in the case of < other programming languages. The variable name < must start with a letter or underscore. The variable < nam

Re: [php-list] Max length of a var

2005-08-12 Thread Patrick Bierans
> Is there a limit to the length of a variable? > I've just come across one that is 176 characters long! Can you same some? Yahoo! Groups Sponsor ~--> http://us.ard.yahoo.com/SIG=12hoi05f5/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=Y

Re: [php-list] max() or Limit 1 DESC doesn't return the last or newest record

2005-08-11 Thread Patrick Bierans
> OK... I only have mysql_fetch_array in this call to the database? Are > you saying it's not coded correctly? I don't have your code, so I don't know. ;) Try to run the sql-statement by hand with phpmyadmin. Are you getting correct result? Yahoo! Groups Sponsor -

Re: [php-list] max() or Limit 1 DESC doesn't return the last or newest record

2005-08-11 Thread Patrick Bierans
> Greetings all, > > The problem is, it is returning the second newest or last record, not the > very newest or last record. I don't think it's an mysql mistake but a php one. Maybe you run mysql_fetch_*() twice before you access the row data? But this might not work if you have "limit 1" (when c

Re: [php-list] How to use a function from another file?

2005-08-09 Thread Patrick Bierans
>> I tried to add a include in my main script: include ("myfunctions.php); >> then type the name of the function that I want to use but it is not the >> good way, or I make a mistake. What is the solution? > There is nothing wrong with that solution at all. I have a functions.php > include as w

Re: [php-list] file_exists with a wildcard

2005-08-02 Thread Patrick Bierans
> I need to find some pictures on the local server, and display them. The > pictures are in the format pix/1234_01.jpg, pix/1234_02.jpg, etc. But > the number varies, and their could be missing pictures (i.e., _03.jpg, > and no _02.jpg). > > Does anyone have any suggestions as to find out how ma

Re: [php-list] IF THEN ELSE statement

2005-08-02 Thread Patrick Bierans
> Thanks Patric. He were go: > > select distinct(sal) from bonus where ename like > 'MARTIN' > SAL > - > 0,00 > 1 row selected > > NB! It makes no difference if I use sal = 0.0 Aye, use IF inside SELECT and UPDATE and not outside. This should do it: update bonus set sal=1250 whe

Re: [php-list] IF THEN ELSE statement

2005-08-02 Thread Patrick Bierans
> If I use: > > IF sal = 0 THEN > UPDATE bonus set sal = 1250 WHERE ENAME = 'MARTIN'; > END IF; > > .. the value of sal is not updated with 1250 please execute this statement: select distinct(sal) from bonus where ename like 'MARTIN'; what is the result? Yahoo! Groups

Re: [php-list] Lowercase problem

2005-07-31 Thread Patrick Bierans
ndle the other part of the problem > - miscellaneous line feeds, etc. > > > On 7/31/2005, "Patrick Bierans" <[EMAIL PROTECTED]> wrote: > >>Look at this: >> >>> $code=' >"11"> '; >> >> $code=preg_replace(&q

Re: [php-list] Lowercase problem

2005-07-31 Thread Patrick Bierans
Look at this: '; $code=preg_replace("/<([a-z0-9]+)/mi",'<'.strtolower("\\1"),$code); $code=preg_replace("/\s*([a-z0-9]+)\s*=\s*\"?\s*([^ >\"]+)\s*\"?\s*/mi",' '.strtolower("\\1").'="\\2"',$code); echo htmlentities($code); // just for output - don't use in-code ?>

Re: [php-list] PHP equivalent for ASP's instr() function?

2005-07-31 Thread Patrick Bierans
strpos() - Original Message - From: "Jim MacDiarmid" <[EMAIL PROTECTED]> To: Sent: Sunday, July 31, 2005 8:02 PM Subject: [php-list] PHP equivalent for ASP's instr() function? > > Is there an equivalent function in PHP to ASP/Vbscript instr() function > where it will check for the exis

Re: [php-list] Re: Web CMS ???

2005-07-31 Thread Patrick Bierans
> can u refer me to one tool for layout management. I mean user can > customize the existing layout (not any HTML editor like Dreamweaver or > any...) upon his wish... Do you mean something like the smarty template engine? Or the RichEdit component? Or do you just want to use bb-code? -

Re: [php-list] Lowercase problem

2005-07-30 Thread Patrick Bierans
> $content = preg_replace($pattern, $replace, $content); > How can I put strtolower(); in to make just the tags into lowercase. $content = strtolower($content); $content = preg_replace($pattern, $replace, $content); You have been tired, nay? ;) Yahoo! Groups Sponsor ---

Re: [php-list] Modifying header information

2005-07-22 Thread Patrick Bierans
> Any attempt to modify heard info must be the FIRST thing that occurs in > your script/page. That is, whatever script you're trying to run must be > parsed prior to any other HTTP or HTML statement, or any other echo or > print statement. Added Note: This also includes invisible chars like space

Re: [php-list] Uploading photos and images

2005-07-22 Thread Patrick Bierans
> Or would a link to another form be better? The way I understand it, the > form > data type has to be "multipart/form-data". Can other fields be handled at > the same time the upload is taking place? you can use one or multiple pages, both designs are common. "multipart/form-data" is just a dif

Re: [php-list] Online Travel System

2005-07-22 Thread Patrick Bierans
> I need to learn the structure of PHP-Based online > travel system for my college task. Perhaps someone in > this forum could give me the flowchart of the system > so that i know where to begin if i want to build an > online travel system. Maybe you want to explain "online travel system" to us?

Re: [php-list] Web browser history

2005-07-22 Thread Patrick Bierans
> I am running script, that gives you a button to push that then sends > you to another page and prints some values for your sheer enjoyment. > My problem is that I can't work out how to make the browser show the > page that you were last on (from the script). I used to know a > javascript func

Re: [php-list] Re: Hello. New to PHP. I have a few basic questions

2005-07-20 Thread Patrick Bierans
first to make sure php is running: create a file named "phpinfo.php" and write this into it: "" Then call the phpinfo.php file. Are you getting a bunch of infos? - Original Message - From: "Cindy Clouse" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 20, 2005 2:01 AM Subject: [php-list]

Re: [php-list] Re: stripping spaces and other illegal chars out of filenames

2005-07-20 Thread Patrick Bierans
> $photo=preg_replace("/[^a-z9-0_\-]+/","",strtolower($photo)); ah. it's 0-9 and not 9-0 - my typing was too fast. ;) $photo=preg_replace("/[^a-z0-9_\-]+/","",strtolower($photo)); Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscrib

Re: [php-list] Formatting the date

2005-07-19 Thread Patrick Bierans
> I have a table where I save the date. The format is "2005-07-19" in my > table. I want to change the format to "19-07-2005" when on the screen for > the user. What is the best way to reformat the date? You may go with DATE_FORMAT(date,format) - lookup the manual for date and time functions:

Re: [php-list] stripping spaces and other illegal chars out of filenames

2005-07-19 Thread Patrick Bierans
>> I am working with a system that will have users uploading files,and I >> can't depend on them not using spaces and other things Unix doesnt' >> like in their file names (like ', ., etc). > $photo = "This is a photo of my dog, Skippy!.jpg"; > $funkychars = array('\'', '.', ',', '$', '!', ' '); >

Re: [php-list] Array Explode

2005-07-14 Thread Patrick Bierans
t: Thursday, July 14, 2005 11:34 AM Subject: Re: [php-list] Array Explode > On 7/14/05, Patrick Bierans <[EMAIL PROTECTED]> wrote: >> Maybe the content of the file only contains theese 5 letters "A R R A Y" >> ? >> >> Jokin'... >> >> a

Re: [php-list] Array Explode

2005-07-14 Thread Patrick Bierans
normal way is: if (is_file($fname)) foreach (file($fname) as $line) echo "line is: $line "; - Original Message - From: "Gordon Stewart" <[EMAIL PROTECTED]> To: Sent: Thursday, July 14, 2005 11:34 AM Subject: Re: [php-list] Array Explode > On 7/1

Re: [php-list] Array Explode

2005-07-14 Thread Patrick Bierans
Maybe the content of the file only contains theese 5 letters "A R R A Y" ? Jokin'... after $text=file($nameoffile) do a print_r($text); to see if it is working. - Original Message - From: "Gordon Stewart" <[EMAIL PROTECTED]> To: Sent: Thursday, July 14, 2005 10:59 AM Subject: [php-list

Re: [php-list] OT MOD-Rewrite

2005-06-27 Thread Patrick Bierans
> And I always thought that you knew everything, Patrick! I do! But I thought you got bored, so ... ;-P > I would guess that it isn't possible, because you can't specify the > fieldname (mystation) but you can specify the field value (pls) > > But I could be wrong... It is just a string... so

[php-list] OT MOD-Rewrite

2005-06-27 Thread Patrick Bierans
what must be done so that an url like this: http://domain.com/mystation.pls gets rewritten to: http://domain.com/index.php?modul=streaming&mystation=stream&type=pls&quality=96 I'm asking for somebody who is not able to get it - but I don't want to get involved on the one hand by myself an

Re: [php-list] OT: mysql special ordering against a list?

2005-06-19 Thread Patrick Bierans
> One caveat - I've never used the case function in MySQL. Oracle has a > similar function called decode, which I've used many times to do > exactly this type of sorting. MySQL's CASE function appears to be the > closest equivalen to Oracle's DECODE. looks good, Mike. I'll give it a try tomorrow.

[php-list] OT: mysql special ordering against a list?

2005-06-18 Thread Patrick Bierans
How can I sort a query by a special order? I need a query like this: select * from orderingtest order by rankingstring against sortlist(highest, higher, high, aboveaverage, average, belowaverage, low, lower, lowest, '', NULL) the structure might be something like this: create table orderingte

Re: [php-list] Looping through forms

2005-06-16 Thread Patrick Bierans
>> if (count($_GET)) { print ""; print_r($_GET); print ""; } Might cause a warning on older php-versions, nay? So the cleaner way: if (is_array($_GET) && count($_GET)) print_r($_GET); Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsub

Re: [php-list] Problem with headers

2005-06-09 Thread Patrick Bierans
you must not include the image data directly. ;) try calling it: - Original Message - From: "Michael Sullivan" <[EMAIL PROTECTED]> To: Sent: Thursday, June 09, 2005 7:58 PM Subject: [php-list] Problem with headers >I found a script for creating thumbnails that I can use for the index

Re: [php-list] Sending forms in email

2005-06-06 Thread Patrick Bierans
> Can someone please help me with this. I am looking for a php script that > can > help me do this. Form data is accessible as an array stored as variable $_REQUEST. So you can use serialize to convert it to a string, send it per mail() and use unserialize() to convert mailtext back to an array

Re: [php-list] Code for generating Binary Tree in PHP

2005-06-06 Thread Patrick Bierans
> Is anyone aware of any Binary Tree Classes that could be used in this yes. mysql. Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://group

Re: [php-list]

2005-06-02 Thread Patrick Bierans
> if (! $_GET['status']) > { echo "none"; > } nope. if (isset($_REQUEST['status'])) Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http:/

Re: [php-list] Cookies

2005-05-30 Thread Patrick Bierans
>> On server create a mysql table where you generate unique IDs for each >> visitor and assign information to that ID in another table. > Why two tables? I was planning to use just one. Normally you have one table with an ID and some info which normally never changes per visit like IP, browser

Re: [php-list] Cookies

2005-05-30 Thread Patrick Bierans
> The idea is to collect more information about people who have visited > before, to build up a more complete picture. It's not an 'accounts' > thing, so it doesn't matter if a few mistakes are made. > > Any suggestions? On server create a mysql table where you generate unique IDs for each visit

Re: [php-list] MySQL connect

2005-05-30 Thread Patrick Bierans
> I use connect, I have never really looked at pconnect, probably simply > because it 'feels' more complicated. You have to check that there is a > connection, because not everyone enters my sites via the home page, so > there is no-where obvious to place pconnect, and my websites have > connectio

Re: [php-list] https?

2005-05-20 Thread Patrick Bierans
> If SSL is working on your web server, yes using https:// connections > should > work and do all of the necessary encryption for browser-server > communications > with and without PHP. You may want to designate that certain directories > (or > files) can only be viewed with SSL (SSLRequireSSL

[php-list] https?

2005-05-20 Thread Patrick Bierans
If I have a ssl-certificate and my hoster put it to my virtual host... Must there be done in php so php speaks secure? Or do I only have to use "https://"; in uri's? Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTE

Re: [php-list] OT: Opting out of Yahoo! tracking

2005-05-18 Thread Patrick Bierans
> http://privacy.yahoo.com/privacy/us/beacons/details.html > > That will bring you to a paragraph entitled "Outside the Yahoo > Network." > > In this section you'll see a little "click here to opt out" link that > will let you "opt-out" of their new method of snooping. > > Once you have clicked

Re: [php-list] Mysql protection & PHP

2005-05-18 Thread Patrick Bierans
> I've been thinking... Always a good thinK ;) > If I allow people to add data to a database (ive got > an 'authorised' flag - if I want it displayed on my > site).. - > > How easy is it for people to put the angled brackets.. > <> & commands etc - & get stored into a database > - & allow th

Re: [php-list] date() & timezone

2005-05-13 Thread Patrick Bierans
> http://php.inspire.net.nz/manual/en/function.gmdate.php Which equals http://php.net/gmdate ;) Take a look at the documentation. If you know and unterstand most of this fantastic php manual with the helpful user contributed notes but you still can't get it working after some attempts ask us

Re: [php-list] Re: Queryyy....

2005-05-04 Thread Patrick Bierans
> that's one stick out of my head...whew :o More to come ;-P Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-l

Re: [php-list] Free scripts and templates for your use

2005-05-04 Thread Patrick Bierans
> I put together some free templates and scripts for you. > They are free of course http://headwebmaster.com > very good graphics flash templates and scripts well... < Free 230 CGI / PHP Scripts - 6 zip files < These four zip files include over 230 scripts which < feature these categories. W

Re: [php-list] Re: Queryyy....

2005-05-04 Thread Patrick Bierans
> you mean i can just do this?? > test you're close to it! Use some " arround it: go for it! Another note: If you have multiple name/value pairs you can join them with the ampersand "&". Another note: Some browsers want you to encode the "&" to "&". So you come to: go for both! Communit

Re: [php-list] Queryyy....

2005-05-03 Thread Patrick Bierans
> we all know how easy it is to display records from databases using the > submit button from form > > but... > > how can i display the contents of a record if i am to use a hyperlink > instead of a submit button like in forums like this one?? it's nearly the same: is equal to index.ph

Re: [php-list] adding records MYSQL - bulk

2005-05-02 Thread Patrick Bierans
> Ive found the error :- But dont know how to fix it :- > Duplicate entry '127' for key 1 > > There are 19 columns / fields per row... - however Ive been chatting > with someone - Live chat - He cant fix it either Well. It's a very basic error which was born by the create statement of your table

Re: [php-list] order of function calling

2005-04-26 Thread Patrick Bierans
> Ok. I down loaded that and am trying to go through it. I like the > dancing gif. Cool pict. Now of course you know that you use Globals On. > Now isnt that a freakin no-no? The code is quite old and was written before register_globals was turned off by default. ;) pe: I no longer place css-

Re: [php-list] order of function calling

2005-04-26 Thread Patrick Bierans
>> Do all logical things before you start outputting html. >> This fixes most problems and makes it easier to use templates. > How do you actually 'do' that? I mean, the function that is attached to > the button that gets data from a as-yet-to-be-set session data is on the > left div and the sess

Re: [php-list] order of function calling

2005-04-26 Thread Patrick Bierans
ta. On the right div is the application data. > > Wade > > > > Patrick Bierans wrote: > >> JS can not read php server side session data because it's clientside. >> How are you accessing session data? With $_SESSION? And are you using >> frames? >> >

Re: [php-list] order of function calling

2005-04-25 Thread Patrick Bierans
JS can not read php server side session data because it's clientside. How are you accessing session data? With $_SESSION? And are you using frames? - Original Message - From: "Wade" <[EMAIL PROTECTED]> To: Sent: Monday, April 25, 2005 11:04 PM Subject: [php-list] order of function call

Re: [php-list] I need help with a Select Query

2005-04-23 Thread Patrick Bierans
> $sql = "SELECT * FROM application WHERE appid != rejected.appid ORDER > BY appid DESC"; looks fine so far. so what is your question? Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL

Re: [php-list] pls. help --

2005-04-22 Thread Patrick Bierans
> problem1: > we are developing a program wherein there is a part where > messages are respectively posted as links(like in yahoo groups :D), question 1: how are the messages stored? i would guess you use mysql. > problem2: > will also include a way to add and delete messages to this output, sq

Re: [php-list] Duplicate user names

2005-04-21 Thread Patrick Bierans
> I'm trying to build a log-in feature for my site. At the moment, users > can log in and create accounts. > > The way I've got it set up is that the users table has the "username" > column as the primary key to make sure that a username remains unique. > > However, when users are registering, how

Re: [php-list] Removing Values after session

2005-04-20 Thread Patrick Bierans
> Im storing three values during a session in a db. When the user logs off > or when they just close the broswer, I want those values turned back to 0. > > I know how to do this if they just log out but, how would you do this if > they just close the broswer? every time he opens a page you refres

Re: [php-list] Next & Previous Records

2005-04-18 Thread Patrick Bierans
> 04182005 1606 GMT-6 > > Patrick, question on this. Im thinking that this only will work when you > have consecutive numbering of application id's like, 1, 2, 3, 4, and so > on. What if you have deleted a number = 1, 4, 5, 8,9,10 = would this > still work? > > Wade &g

Re: [php-list] Next & Previous Records

2005-04-18 Thread Patrick Bierans
I think it's a wrapping thing. If reaching the end start from beginning. - Original Message - From: "Wade" <[EMAIL PROTECTED]> To: Sent: Monday, April 18, 2005 10:57 PM Subject: [php-list] Next & Previous Records > 04182005 1551 GMT-6 > > I want to find the next and previous records i

Re: [php-list] Error on opening a file for writing.

2005-04-16 Thread Patrick Bierans
> and this is the error: > Warning: fopen(test.txt): failed to open stream: Permission denied in > /home/mmayorc/public_html/pages/cont.php on line 7. php is not allowed to write to the folder. php might have another user/group as you when you use ftp or crate files via vi by shell. Community

Re: [php-list] Re: Deployment problems

2005-04-15 Thread Patrick Bierans
>> lookup php.ini if the current dir (" . ") is in INI_PATH > > I'm not sure I understand what you mean. The problem is on my ISPs > server. I don't have access to INI_PATH. Another idea: run phpinfo() and look up "include_path". What do you see? Community email addresses: Post message: ph

Re: [php-list] Re: Deployment problems

2005-04-15 Thread Patrick Bierans
>> lookup php.ini if the current dir (" . ") is in INI_PATH > > I'm not sure I understand what you mean. The problem is on my ISPs > server. I don't have access to INI_PATH. In this case try absolute paths. Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[

Re: [php-list] Import on phpMyAdmin

2005-04-14 Thread Patrick Bierans
> I receive this error: > > You have an error in your SQL syntax near 'defaultCURRENT_TIMESTAMP ON > UPDATE CURRENT_TIMESTAMP,`first_name` varchar( 30' at line 3 Have you really tried to solve it by yourself or are you just asking us to do your job? This one is very simple and obvious. Just add

Re: [php-list] How do I hide (unreveal) file names in the address bar

2005-04-14 Thread Patrick Bierans
Yes, CSS is broken. But the code works ;) http://bierans.de/shared/files/application-structure-example-v1.3.zip - Original Message - From: "Tom Barker" <[EMAIL PROTECTED]> To: Sent: Thursday, April 14, 2005 4:02 PM Subject: Re: [php-list] How do I hide (unreveal) file names in the addr

  1   2   >