Re: [PHP] INSERT INTO using foreach

2004-07-23 Thread Jason Davidson
It may be a matter of opinion, but i beleive this is a poor method of doing what your doing. I would get my values thru $_REQUEST and use addslashes to escape what needs to be escaped, and i would write my SQL query with full column listing and string values in quotes. eg.. INSERT INTO table (col

Re: [PHP] Array help

2004-07-23 Thread Jason Davidson
You can either hard code the associations, with something like a swtich statement, or i suppose loop thru one array, adding a key value pair of the numbers => background images. Or, you could create a table called Backgrounds, give them an id which you store in the existing field of your db, and u

Re: [PHP] Error parsing php.ini

2004-07-23 Thread Jason Davidson
Gosse <[EMAIL PROTECTED]> wrote: > > Jason Davidson wrote: > > Oh, it was a one time error, strange, youve never had this error > > before, and this definately is the php.ini file your using, ie, there > > isnt another somewhere thats getting used? > >

Re: [PHP] Nested If...Else...

2004-07-24 Thread Jason Davidson
print out all the values of the vars your comparing often youll find one of them is not what your expecting Jason On Sat, 24 Jul 2004 11:05:06 -0500, Robb Kerr <[EMAIL PROTECTED]> wrote: > What's wrong with this syntax. I just can't see my mistake. > > if ($vBkgrndImage == "AnswerPage") { >

Re: [PHP] Re: If...Or...Else

2004-07-24 Thread Jason Davidson
OR is also bitwise is it not? Jason On Sat, 24 Jul 2004 21:23:13 +0400, Stan F <[EMAIL PROTECTED]> wrote: > Operations OR and || have different execution priorities. I'd prefer "||" as > it's "more important" so not so many parentheses needed to ensure the order > of interpretation is exactly wha

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Jason Davidson
whats in UserId var.. any spaces or nonword chars.. if so, quote it. Jason On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > I've been working on a query to retrieve a user's data based on their UserID > that is stored in a variable "$_SESSION['logname']" which underneath

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Jason Davidson
Sorry, let me clearify.. unless UserId is an integer, quote it !! jason On Sat, 24 Jul 2004 12:03:54 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: > whats in UserId var.. any spaces or nonword chars.. if so, quote it. > > Jason > > > > On Sat, 24 Jul 200

Re: [PHP] Re: If...Or...Else

2004-07-24 Thread Jason Davidson
ah right.. :) Jason On Sat, 24 Jul 2004 19:50:17 +, Curt Zirzow <[EMAIL PROTECTED]> wrote: > * Thus wrote Jason Davidson: > > OR is also bitwise is it not? > > No, | is bitwise > > Curt > -- > First, let me assure you that this is not one of those shady pyra

Re: [PHP] Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Jason Davidson
Hey, keep trying, you can use php to generate JS to send to the browser, its especially usefull for form validation as you said. Make sure your JS is correct, and within script tags. Start with simple JS, like, alert("i worked"); then start adding one piece at a time and constantly checking to s

Re: [PHP] PHP - mySQL query question

2004-07-25 Thread Jason Davidson
single quote 'y' Jason On Sun, 25 Jul 2004 11:05:23 -0400, Karl-Heinz Schulz <[EMAIL PROTECTED]> wrote: > I have a simple question (not for me). > > Why does this query does not work? > > $links_query = mysql_query("select id, inserted, title, information, > international from links WHE

Re: [PHP] Refer a class

2004-07-25 Thread Jason Davidson
If there is no error, check the values of all the vars and array ellements in your logic for the first method. Make sure its actually getting to the point where it instantiates the new object. Jason On Sun, 25 Jul 2004 19:36:44 +0200, Michael Ochs <[EMAIL PROTECTED]> wrote: > Hi, > I try to load

Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Jason Davidson
hey, just take the single quotes around the word logname out and you should be ok. Jason On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['log

Re: [PHP] Refer a class

2004-07-26 Thread Jason Davidson
call $this->main->nickname in $class2, wich actually should call > $myclass, it returns "xyz" instead of "abc"! > > Any idea? > > Thanks, Michael > > "Jason Davidson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL

Re: [PHP] Retrieve The Last Record in a Table

2004-07-26 Thread Jason Davidson
as mentioned already, use a column in the table to order the query and then use LIMIT to only to return one record. Best columns to use would be an auto_increment or a datetime field type. Jason On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > > > I would like to retr

Re: [PHP] Is there a brian I can pick?

2004-07-26 Thread Jason Davidson
Hey, an alternative to your switch statement, is to have an associative array with the full State names in it like this ... $states = array('MI'=>'Michigan'); and so forth. then just uses it in your html.. $states['$state']; Jason On Mon, 26 Jul 2004 15:28:11 -0400, Tom Ray [Lists] <[EMAIL PROTE

Re: [PHP] Retrieve The Last Record in a Table

2004-07-27 Thread Jason Davidson
s People > www.arraspeople.co.uk > - > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > as mentioned already, use a column in the table to order the query and > > then use LIMIT to only to return one reco

Re: [PHP] php & paypal

2004-07-27 Thread Jason Davidson
Might be easier to use session vars to track whatever it is your tracking. Jason On Tue, 27 Jul 2004 11:11:31 -0400, Mike R <[EMAIL PROTECTED]> wrote: > > Does anyone know if it is possible to pass a variable in the URL to the > return page when using paypal? > > Meaning, when someone is done a

Re: [PHP] Sessions Timeout

2004-07-27 Thread Jason Davidson
I would put a timelimit on the session, create a session var called time, or loginTime or something, and compare it to time() with php, give a leyway of an hour or something. This is a standard securty measure to prevent people from leaving the pc with a session running all day, and someone else si

Re: [PHP] Array assistance

2004-07-27 Thread Jason Davidson
I would simply build the array more specifically, so that it doesnt include things you dont want. Jason On Tue, 27 Jul 2004 16:20:02 -0500, Alex Hogan <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a page where I'm collecting answers from a series of questions. > The questions are entered into t

Re: [PHP] html text area and mysql text fields

2004-07-27 Thread Jason Davidson
i keep the string intact as well, for that exact reason, when you want to edit dynamically, i dont want all sorts of html tags in my textarea. So, the solution i found works, is to use the php funtion nl2br(). use that when displaying the info in html., that way you dont actually change the origin

Re: [PHP] eliminate keyword

2004-07-27 Thread Jason Davidson
if you mean remove the new line characters, then a str_replace('\n', '', $textbody); should be sufficient. If thats not what you mean, please clarify. Jason On Tue, 27 Jul 2004 18:29:42 -0500, Raúl Castro <[EMAIL PROTECTED]> wrote: > Hello, > > I have a form with a textarea field, I'm trying to

Re: [PHP] Showing all users who are logged in

2004-07-27 Thread Jason Davidson
If you have a users table, you could add a field to it that contains the last login datetime. and query that table for datetimes that are less then your session timeout (if one exists). Of coarse, you would have to update that table when a user logs in. Jason On Tue, 27 Jul 2004 19:55:49 -0400,

Re: [PHP] Adding +7 more days on date() value problem

2004-07-27 Thread Jason Davidson
Definately check out strtotime() function, way easier than adding up the seconds of a timestamp, or breaking apart a getdate array. Jason On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote: > I can't figure how could i add +7 more days on the DD (Day) value. My > problem

Re: [PHP] Newbie image manipulation question

2004-07-28 Thread Jason Davidson
Hey, you can do what your looking for with phps gd comiled in. You may need to add jpg, gif libs if you dont already have them. Check GD on the php site, there are plenty of examples that cover exactly what your looking for i think. Jason On Wed, 28 Jul 2004 08:05:52 -0700, Brian Dunning <[EMAI

Re: [PHP] Session Expiration Timeout

2004-07-28 Thread Jason Davidson
I beleive there is some session timeout setting in php.ini .. search for session or expire or timeout in that file. Jason On Wed, 28 Jul 2004 20:18:21 +0200, Jordi Canals <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm dealing with sessions in a project. Here people are editing some > documents o

Re: [PHP] list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth) fails.

2004-07-28 Thread Jason Davidson
check the manual for list. It mentions using only numerical array indices for list. There is a warning on it even i beleive. Jason On Wed, 28 Jul 2004 20:47:37 -0700, Daevid Vincent <[EMAIL PROTECTED]> wrote: > Linux. PHP5. > > Why does this fail when using an array element, but using a variab

Re: [PHP] Variable functions within an object

2004-07-29 Thread Jason Davidson
http://ca3.php.net/manual/en/function.call-user-func.php ? Jason On Thu, 29 Jul 2004 17:11:50 -0500, Julio Sergio Santana <[EMAIL PROTECTED]> wrote: > I need to record the names of functions, and then use them later. > Recently I found the following example within the on-line documentation: >

Re: [PHP] PHP5 exception handling

2004-07-30 Thread Jason Davidson
You can check out how exceptions are handled in Java or C++ as well, they all sorta work the same, you may find more complete docs for them. Jason On 30 Jul 2004 14:58:59 -, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > I've done some reading on the ZE2 exception handling, but I'm not

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
is it possbile $this->year isnt what you expect? Jason Jon Bertsch <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I have found a problem using the str_replace() function in PHP5. Over this > past weekend we switched our production server to php5.0.0 running on > apache 1.3.31 on SUSE9.1. Our

Re: [PHP] Re: POST superglobal is empty

2004-08-04 Thread Jason Davidson
How about print_r($_REQUEST); Dan Phiffer <[EMAIL PROTECTED]> wrote: > > Craig Donnelly wrote: > > Show the code you are using... > > I'm having the same problem. Here is a test script that prints Array() > regardless of what you enter and submit with the form: > > -- test.php -- > > > >

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
Yup, i understand not in php 5, there was some large OO changes in php 5, which is why i asked about $this->year. Ive been using php 5 for the last year, and havent had a problem with str_replace, and have used it a fair amount for loading email templates. So when you look at the source, the @@F

Re: [PHP] str_replace() problem in PHP5 - anyone else?

2004-08-04 Thread Jason Davidson
My mistake on $this_year. Jon Bertsch <[EMAIL PROTECTED]> wrote: > > > Jason, > > This code is not using any OO the variable is $this_year not $this->year. > > Running it under php5 on my dev box the string replace function works and > replaces the text as expected. > > Jon Bertsch > >

Re: [PHP] opposite of array_unique()?

2004-08-04 Thread Jason Davidson
you could loop thru the array, and using a nested loop, test each value against all other values.. and keep ones that match in a new array. But as mentioned, SQL would be easier. Jason Curt Zirzow <[EMAIL PROTECTED]> wrote: > > * Thus wrote Adam Williams: > > for example if I have an array: >

Re: [PHP] Need Some Direction

2004-08-05 Thread Jason Davidson
I created a simpleAuth script that handles authentication, then sets up a session, there is a method that i called requireAuth(); i call this method on any page i want restricted to the members, it checks the for the valid sessoin, and also checks the time of login, and calls my destoy method if u

RE: [PHP] How pass form variable to window.open()

2004-08-05 Thread Jason Davidson
Unless student is set somewhere else that wont work.. you need the form to submit before the text field 'student' sets a var named student. One way to do such, without all the window formating is to just submit the form to the page you want. and target=_new in the form tag. other than that, you

Re: [PHP] $HTTP_REFERER

2004-08-05 Thread Jason Davidson
Its possible norton firewall OR your browser is altering the headers. how are you redirecting, norton may not allow for some kind of redirects either. Try turning norton off, and visiting the page :) Jason "Shaun" <[EMAIL PROTECTED]> wrote: > > Hi, > > I seem to have problems redirecting p

RE: [PHP] is there a more efficient query?

2004-08-06 Thread Jason Davidson
I would use IN, or even BETWEEN if there exists such a function... Jay's example is much cleaner and readable. Jason "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > > [snip] > Tis SQL > > SELECT value > FROM element_values > WHERE user = $user_id > AND(element=48 > OR element=52 > OR an

Re: [PHP] is there a more efficient query?

2004-08-06 Thread Jason Davidson
your only getting one row beucase your only pulling one row from the array. You need to loop thru the rows to grab them all. Jason Brian Tully <[EMAIL PROTECTED]> wrote: > > on 8/6/04 12:28 PM, Jay Blanchard at [EMAIL PROTECTED] > wrote: > > > [snip] > > Tis SQL > > > > SELECT value >

Re: [PHP] Re: IMPORTANT: Please Verify Your Message

2004-08-06 Thread Jason Davidson
Most of the Verify MEssage emails i get come from tgpnexus.com .. they are most certainly not from the spoofed address they claim. Jason Chris <[EMAIL PROTECTED]> wrote: > > Josh Acecool M wrote: > > >I've requested that you do not contact me again. > >http://www.acecoolco.com/legal.php >

Re: [PHP] String formatting

2004-08-06 Thread Jason Davidson
you could remove all br tags, \n \r chars from the string. use $string = str_replace(array('\r','\n',''), '', $string); or something similar Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > Hey all! Glad you are here. > > I have a question that is confusing me a bit. I am trying to out

Re: [PHP] String formatting

2004-08-06 Thread Jason Davidson
you could use css too now that i think of it.. wrap your stirng in some div tag or somehting and use white-space: nowrap; or something like that. Jason [EMAIL PROTECTED] wrote: > > Jed R. Brubaker wrote: > > >Hey all! Glad you are here. > > > >I have a question that is confusing me a bit. I am

Re: [PHP] any javascript gurus?

2004-08-08 Thread Jason Davidson
what is it that you need... for it to calculate the fields... just get the value of the fields with.. document.FORMNAME.FIELDNAME.value make sure your dealing with integers for doing the math, the value will be a string initially.. use parseInt or parseDouble or something .. Jason "Aris Santi

Re: [PHP] ImageColorTransparent Problem

2004-08-08 Thread Jason Davidson
Does IE even support PNG transparncy properly anyways??? maybe thats the issue here? Jason "Kevin" <[EMAIL PROTECTED]> wrote: > > Hi, > > I am having PHP Version 4.3.4 with GD 2.0.15 compatible and PNG support > enabled. > > My problem with the following code is that the image produced be this

Re: [PHP] Need Some Direction

2004-08-09 Thread Jason Davidson
if you have /var/www/html/ defined as documentroot, as you mentioend then outside is anything outside the directory html/ so /var/www/php/ could hold all your php files, and be outside the docroot. JAson "Aaron Todd" <[EMAIL PROTECTED]> wrote: > > When you say "outside of the webroot" do you m

Re: [PHP] Global persistent variables

2004-08-10 Thread Jason Davidson
Not like asp's application("") there isnt. You can use phps $_SESSION var, which is similar to asps Session(). I dont think php runs the same asp, in order for asp's application vars to work, you would think that asp must be running in some state continuously, and i dont think php does that. I

RE: [PHP] Global persistent variables

2004-08-10 Thread Jason Davidson
Im not so sure asp is completely stateless is it. The application var will hold a var as long as the server is running, for any visitor. The var doesnt need to be set each page load either.. eg. Application("counter").. you can add to the counter on any page, by any visitor, at any time, and it

RE: [PHP] Global persistent variables

2004-08-10 Thread Jason Davidson
Im reading up a little on it, from the msdn site, "make your ASP pages stateless if possible, relying on Session or Application variables for transient state only" Interesting, but not conculsive. ASP sucks anyways.. Bottom line, PHP is definately stateless, and there is no Application() equivile

RE: [PHP] PHP performance [solution]

2004-08-10 Thread Jason Davidson
woohoo indexes kick a$$.. at the expense of mem though :) J "Ed Lazor" <[EMAIL PROTECTED]> wrote: > > I added more indexes. The 20 minute report just took 40 seconds *grin* > > Thanks Everyone, > > Ed > > > > -Original Message- > > From: Curt Zirzow [mailto:[EMAIL PROTECTED] > > Sen

Re: [PHP] OO Question for PHP4

2004-08-11 Thread Jason Davidson
Im sure you should be returning a value in your constructor at all?? Ill check the manual, but i dont think ive ever seen a constructor return anything, doesnt sound right.. Let me check. Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > Hi all. As the subject suggests, I am using PHP4 and

Re: [PHP] OO Question for PHP4

2004-08-11 Thread Jason Davidson
Yup, i typo'd .. should have read, Im not sure you should be returning a value.. Jason Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > > * Jason Davidson <[EMAIL PROTECTED]>: > > Im sure you should be returning a value in your constructor at all?? Il

Re: [PHP] Adjust two or more mysql rows ?

2004-08-11 Thread Jason Davidson
Yup, confused me... what is it for? J "Dave Carrera" <[EMAIL PROTECTED]> wrote: > > Hi List, > > I have a qty posted via a form field, lets say 46. > > In my mysql table I have two rows which I want to reduce their qty fields. > > 1 row has a qty of say 13 and the second has a qty of 50, maki

RE: [PHP] Adjust two or more mysql rows ?

2004-08-11 Thread Jason Davidson
as I have it laid out here but I think the basic logic > is ok. > > Hers goes :-) > > Dave Carrera > > -- > UK Web Hosting @ http://www.ephgroup.com > > > -Original Message- > From: Jason Davidson [mailto:[EMAIL PROTECTED] > Sent: 11 August 2004 19:26

Re: [PHP] Query Question

2004-08-11 Thread Jason Davidson
whats the error, are there any matching fields for the columns eventetail.event and event.id? Jason "Karl-Heinz Schulz" <[EMAIL PROTECTED]> wrote: > > Why does this query not work? > It should only show the eventdetails for the shown event. > > --

Re: [PHP] Techniques for doing story

2004-08-17 Thread Jason Davidson
THats kinda cool. you see that there is also a page=2 query if you click to a different page, so i would assume, they store the html in a database for each page of a story. and then give a story_id to those records. so in the table, if there is 4 pages for story 12, then there are 4 records all w

Re: [PHP] Techniques for doing story

2004-08-17 Thread Jason Davidson
Friendly crew today. :) Jason John Nichel <[EMAIL PROTECTED]> wrote: > > rogue wrote: > > Hi all, > > > > I want to do something like this: > > > > http://www.cgnetworks.com/story_custom.php?story_id=2259 > > > > Where we can publish an article, multiple page even and lay it out in a > > ni

Re: [PHP] Techniques for doing story

2004-08-17 Thread Jason Davidson
links, but that one and did not think my question > > was that "out there" for the list... oh well. > > > > > > On Aug 17, 2004, at 12:31 PM, Jason Davidson wrote: > > > >> Friendly crew today. :) > >> > >> Jason > >> >

Re: [PHP] OO Theory Question

2004-08-17 Thread Jason Davidson
put something in your script like if($_SESSION['authed'] == true) $user = new User($_SESSION['userId']); or something similar. Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > Hi all! I could use some perspective on a project that I am currently > working on. > > I am trying to u

Re: [PHP] OO Theory Question

2004-08-17 Thread Jason Davidson
n variable that said yo > uwere logged in, but then the database calls would still have to be made on > each page. > > Thanks for the idea - any others? > > > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > p

Re: [PHP] multi-uploading

2004-08-17 Thread Jason Davidson
post some code please. Jason "Brad Ciszewski" <[EMAIL PROTECTED]> wrote: > > I am having troubles with a script im trying to write. I was wondering > if anyone could help me. The script needs to upload 2 files to a > directory, and have a field for a name, which will then figure out the > URLs o

RE: [PHP] OO Theory Question

2004-08-17 Thread Jason Davidson
i think for the ease of use, 1 db call per page is minimal, especially sinse we are talking about some small fields here. THe db is local to the webserver, so really, whats the problem. Jason "Ed Lazor" <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > I don't know - is it? > >

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Jason Davidson
Do you have magic quotes turned on in your php ini file? Jason Tim Traver <[EMAIL PROTECTED]> wrote: > > Hi all, > > ok, I've made my own version of a file manager complete with a text editor, > and I'm having troubles figuring out some issues. > > I present the text to be edited retrieved f

Re: [PHP] oop too slow

2004-08-19 Thread Jason Davidson
When i have many many objects of the same type to build, i do something like this... function getEvents($sql = '') { $events = $this->dbh->query(" SELECT cols, cols, FROM table,table WHERE blah blah balh ($sql ? " AND $sql" : ''),'rows_array');

Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
its possible to add HTML elements with DOM, im not sure what it has to do with php though? Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > Is it possible to use the DOM to add (HTML) elements to a page at the time > the page is being shown? The HTML and VBScript shown below is a simplified > v

Re: [PHP] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
nal question again; it is quite clear about the relevance to > PHP. > > > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > its possible to add HTML elements with DOM, im not sure what it has to > > do with php thoug

Re: [PHP] Re: Newbie. Posting to backend MySQL database

2004-08-28 Thread Jason Davidson
If you just need to put it in the database, you dont need a form to do that.. just open a connection to your db, and query it in. read about mysql functions in the php manual.. specifically mysql_connect, mysql_select_db and mysql_query , i beleive there is a functional example of all you need o

Re: [PHP] php does not get variable values in POST method

2004-09-02 Thread Jason Davidson
Its possible you had register globals turned on for your server, and its not turned on now. How do you retrieve these vars, try retrieving them with $_REQUEST['myVarName'] or $_POST['myVarName'] Jason Leticia Campos <[EMAIL PROTECTED]> wrote: > > I developed an html/php form in a Php version

Re: [PHP] Sessions Problems

2004-09-03 Thread Jason Davidson
Read up on 'named sessions' I think that may be your solution jason Mark <[EMAIL PROTECTED]> wrote: > > > --- Octavio Herrera <[EMAIL PROTECTED]> wrote: > > > No, I do not store two items with the same key, I just open another > > session > > in other page and it just overwrite session data

Re: [PHP] PHP Linux "locate" to html script?

2004-09-03 Thread Jason Davidson
I assume you mean locating something on the server, as this would be a serious breech of security otherwise. anyways, bickticks will run shell comand line programs and return the output.. ie print `locate myFile'`; jason "BOOT" <[EMAIL PROTECTED]> wrote: > > Does anyone have a script that can

Re: [PHP] Clean variables sent from forms

2004-09-04 Thread Jason Davidson
Make some field unique, so it wont work thats an easy solution, there other ways.. Jason "Dre" <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to perform a database insertion for a new record from data I > receive from a HTML form > > I send the data to the file containing the insertion

Re: [PHP] converting seconds since unix epoc to date array

2004-09-06 Thread Jason Davidson
How is the date stored, MySQL db??? if so, you can select dates out as unix timestamps. Otherwise i would use mktime or strtotime... Jason Jason FB <[EMAIL PROTECTED]> wrote: > > Can anyone tell me how to convert a date stored in the format > "-MM-DD" to an integer of seconds since unix

Re: [PHP] converting seconds since unix epoc to date array

2004-09-06 Thread Jason Davidson
beware of dates before 1969. Justin French <[EMAIL PROTECTED]> wrote: > > Jason, > > This seems to work fine for me: > > $daysToAdd= 5; > $secondsToAdd = $daysToAdd * 86400; > $dateIn = "2004-07-24"; > $dateInStamp = strtotime($dateIn); > echo date('m/d/Y h:i:s',$da

Re: [PHP] class packages

2004-09-08 Thread Jason Davidson
Out of curiosity, how would you prefer it? the way you mentioend is basically how i do though. Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > As far as I can tell there is not an easy way yet to create packages in > PHP5. > > It seems the following is the best option: > include('clas

Re: [PHP] Remove punctuation

2004-09-09 Thread Jason Davidson
http://ca3.php.net/manual/en/function.str-replace.php if you have the array of puncuation already, i think that is your solution. Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > Hi all! > > I am creating a function that will remove punctuation from a string, > however, I am wondering

Re: [PHP] Remove punctuation

2004-09-09 Thread Jason Davidson
i think str_replace is faster that ereg_replace Jason John Nichel <[EMAIL PROTECTED]> wrote: > > Jed R. Brubaker wrote: > > Hi all! > > > > I am creating a function that will remove punctuation from a string, > > however, I am wondering if PHP has a function somewhere that will do the > > sa

Re: [PHP] Remove punctuation

2004-09-09 Thread Jason Davidson
ya, no doubt, i was going to repost my message, i should have said, that manual suggests using str_replace over ereg_replace... without reason.. i just assumed it was speed and resources.. eitherway, both would work, try em both. :) Jason John Nichel <[EMAIL PROTECTED]> wrote: >

Re: [PHP] Assigning one var to multiple vars

2004-09-09 Thread Jason Davidson
$var2 = $var3 = $var5 = "all the same"; Jason "Matthew Sims" <[EMAIL PROTECTED]> wrote: > > > Just mostly curious but is there a way to assign one variable to multiple > variables in one single line? > > Rather than do this: > > $var2 = $var1; > $var3 = $var1; > > Is there a method to perfo

Re: [PHP] CSS not picked up

2004-09-11 Thread Jason Davidson
Possibly you dont have those fonts to see them? Jason "Jeff Swanberg" <[EMAIL PROTECTED]> wrote: > > I have the following in my CSS (loaded on the main site page): > > /* FOOTER */ > > .footer { > font-family: Tahoma, "Trebuchet MS"; > font-size: 9px; > color: #BFBFBF;

Re: [PHP] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Jason Davidson
There is nothing wrong with what your doing, i use this sort of thing for all the big sites i make, i use a page class and use methods to create the header and footer, so your concept is good. I would investigate your html_head() function, to make sure its actually returning something. Sinse your

Re: [PHP] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Jason Davidson
yup, you took the words from my mouth... [EMAIL PROTECTED] wrote: > > dirk wrote: > > >The first function you need to call using to see the > output > >THe second function is not a real function because it has no return > >statement. In german you call this "Prozedur". Don't know if it's the >

Re: [PHP] mysql_connect does not connect

2004-09-13 Thread Jason Davidson
Windows XP Firewall, or any other firewall for that matter must be off. Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > I have: > PHP Version 5.0.1 > MySQL 5.0.1 > Apache 2.0.48 > Winows XP Pro SP2 > > MySQL is working fine as best as I can see; I have tried the various samples

Re: [PHP] mysql_connect does not connect

2004-09-13 Thread Jason Davidson
Also, a google on the error returns hundreds of results.. http://www.google.ca/search?hl=en&ie=UTF-8&q=Can%27t+connect+to+++MySQL+server+on+%27localhost%27+%2810061%29&btnG=Search&meta= Jason "Jason Davidson" <[EMAIL PROTECTED]> wrote: > > Windows

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
it works. Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Windows XP Firewall, or any other firewall for that matter must be off. > > Jason > > Can so

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
AIL PROTECTED]> wrote: > > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Also, a google on the error returns hundreds of results.. > > > http://www.google.ca/search?hl=en&ie=UTF-8&q=Can%27t+connect+to+++MySQL+ser

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
opened, at least not for > specific addresses. So if this were a requirement, probably many others > would have that specific problem. > > However if nothing else works, I will try to look into this further when I > have time. At the moment I must spend time on something else. &g

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
the issue he is having, but it is an issue i have dealt with before, as retarded as you all seem to think it is. Jason John Nichel <[EMAIL PROTECTED]> wrote: > > Jason Davidson wrote: > > The webpage of coarse, is not local, regardless of where its hosted, so > > a

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
p;ie=UTF-8&q=mysql+firewall+localhost&btnG=Search&meta= Cheers, and good luck Jason "Jason Davidson" <[EMAIL PROTECTED]> wrote: > > ok, well, i just posted a link for you to check out, it gives insight on > how mysql connects on different platforms, this w

Re: [PHP] php/MYSQL remove duplicate records

2004-09-14 Thread Jason Davidson
you could select out all the DISTINCT email addresses, and delete the table, and repopulate it with your selected rows add a constraint to the table to make email column unique afterwards maybe. Jason Dustin Krysak <[EMAIL PROTECTED]> wrote: > > Hi there - I have an extremely simple table that

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
, which in unix, is rarely, but in windows, is not all that rare. Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > "John Nichel" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Jason Davidson wrote: > >> The webpage

Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
> applicable here. I do not see anything else on that page that is relevant. > > > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > ok, well, i just posted a link for you to check out, it gives insight on > > how mysq

Re: [PHP] mysql_connect does not connect

2004-09-15 Thread Jason Davidson
lved a problem with your EXACT error msg before. That makes this not a guess, but an educated and experienced suggestion. and yes, all forms of help on this form are as such. Yup, im an a$$hole , i dont like being completely shutdown by people requesting help, when i take the time to impart som

Re: [PHP] Re: mysql_connect does not connect

2004-09-15 Thread Jason Davidson
firewall, who would have thought Jason Wong <[EMAIL PROTECTED]> wrote: > > On Thursday 16 September 2004 06:14, Sam Hobbs wrote: > > [quote from another Sam Hobbs post] > > I am the original poster. The reason I avoid doing things like that is > > because it is a guess. It should not be nec

Re: [PHP] checking multiple URL parameters

2004-09-15 Thread Jason Davidson
same way, if i understand your questoin... if your url looks like this sometestpage.php?mov=something&year=1999 - the queries are seperated by the '&' char.. then $_REQUEST will have both mov and year elements in it so just as $_REQUEST['mov'] worked, so would $_REQUEST['year'] Jason Dusti

Re: [PHP] How I can create....

2004-09-15 Thread Jason Davidson
the reason it doesnt work, is becuase you have muddied the requests for the client and the server. PHP is completely server side, so putting a php function name in onclick, which will execute client side code doesnt work. the solution would be to have you button reload the page, or submit to an

Re: [PHP] Strip Everything But Letters and Numbers?

2004-09-15 Thread Jason Davidson
i think with perl regs.. as preg_replace is, you can just use a shortcut command.. \w is any word char, \d is any digit.. im not sure it will improve this solution any, but its something else :P Jason Marek Kilimajer <[EMAIL PROTECTED]> wrote: > > Jeff Oien wrote: > > Is there an easy way to

Re: [PHP] Re: mysql_connect does not connect

2004-09-16 Thread Jason Davidson
woah, full functionality.. it has will still connect, at least, it will still connect for me. Where the functionality is missing, im not sure. But sinse the error is cant connect to localhost, i would say that it strying to connect to localhost, and not being allowed. That said, im fully open

Re: [PHP] mysql_connect does not connect

2004-09-16 Thread Jason Davidson
i am in total agreeance of this post. Sinse the 'flame' war is primarily between me and everyone else, especially sam hobbes, (not the first time either), no more contributiuons to this thread from me. I hope it gets resolved, and i hope it gets posted as much so others can search the archive of

Re: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
The last paragraph refers to me :) and im quite proud of it now, ive printed some of your emails out, and i keep them around, they really do make me smile, not becuase im so much an a$$hole, but becuase, youve already said, that altering your firewall allowed you to connect. Which not so coinciden

Re: [PHP] Re: mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Yes yes, your always relevent, we are not... funny that you have the problem and we do not though. Jason "Sam Hobbs" <[EMAIL PROTECTED]> wrote: > > "Jason Wong" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > I'm not familiar with MySQL under Windows, but I believe that

Re: Fw: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Cheers on that, this thread has become amusement, that is payment enough Jason "John Holmes" <[EMAIL PROTECTED]> wrote: > > "Sam Hobbs" <[EMAIL PROTECTED]> wrote in message > > One problem is that I get answers that are not accurate, so it is > > difficult to know which ones are accurate. > >

Re: Fw: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Im not a john, but to add to confusion we could all sign with 'J' Jason John Nichel <[EMAIL PROTECTED]> wrote: > > John Holmes wrote: > > "Sam Hobbs" <[EMAIL PROTECTED]> wrote in message > > > >> One problem is that I get answers that are not accurate, so it is > >> difficult to know which one

  1   2   >