Re: [PHP] Re: Need login suggestions

2010-05-02 Thread Bobby Pejman
I would also agree that allowing parent registration could be risky. What you may be able to do just off the top is create a UserLevel field in your users table and assign value 1 for all those who say they're students. That is, if you have no student ids at your disposal. Then, when parents

Re: [PHP] Re: replying to list (I give up)

2010-04-21 Thread Bobby Pejman
I must say, I never heard or even thought of the idea of calling it LookOut. Hahaha. It made me laugh for a good 10 minutes and if that term is open source, I will be using it ;) -Original Message- From: "Bob McConnell" Date: Wed, 21 Apr 2010 15:01:55 To: Michelle Konzack; Subject:

Re: [PHP] how to check function's execution?

2009-09-07 Thread Bobby Pejman
Your dbupdate is probably executing a mysql_query command. Is so, update results from mysql_query will be either true on success or false on failure. If your query also fails due to perms it will return false. --Original Message-- From: A.a.k To: php-general@lists.php.net ReplyTo: A.a

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Bobby Pejman
had to rewrite a lot of code after discovering it. Good times... Thanks for clarifying everyone. -Original Message- From: Martin Scotta Date: Mon, 7 Sep 2009 16:43:59 To: Cc: Subject: Re: [PHP] Overwrite value of true or false in PHP On Mon, Sep 7, 2009 at 4:14 PM, Bobby Pejma

[PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Bobby Pejman
Hi, I noticed that the following returns a 1. echo (1<2) ? True : False I was under the impression that true/false are of type boolean and not int. But in php anything other than 0 translates to true, meaning a 1. What I am trying to achieve is for a 1 to be a 1 and a true or false to be a t

Re: [PHP] PHP6 Stable Release Schedule

2009-09-05 Thread Bobby Pejman
Very nice! Use of E_STRICT notifies the user of deprecated functions. Thanks for the note. :) I read that E_ALL forces variable declaration, though I have yet to get that working in my code. --Original Message-- From: Richard Heyes Sender: richard.he...@gmail.com To: Bobby Pejman Cc

[PHP] PHP6 Stable Release Schedule

2009-09-04 Thread Bobby Pejman
Hi, Does anyone know when the stable release of PHP6 be ready for download? I hear there's a lot of goodies in version 6 including built-in Caching. Yum. Also, will PHP ever implement the Strict mode similar to Perl's 'using Strict'? Thanks, Bobby

RE: [PHP] interview

2006-04-13 Thread Bobby Matthis
How about questions they want to hear?: 1) Would you mind receiving a very large paycheck? 2) Do company cars offend you? 3) Would you like a scholarship offered for every one of your children? Ask those three questions, and you have hired them.that's all I know :) -Original Message--

[PHP] ZEND Certification

2006-04-05 Thread Bobby Matthis
I'm sure this has been asked in the past, but I figured up to date info never hurts. I'm going to be scheduling my certification soon, but I wanted to hear from any of you that recently got zend certified recently and if you had any advice. Is there any particular portion I should make sure I hav

RE: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Bobby Matthis
I'm far from an expert: But maybe one Server has magic quotes on and the other does not. One automatically escapes all the characters for you in the data string and the other does not? Bobby -Original Message- From: Weber Sites LTD [mailto:[EMAIL PROTECTED] Sent: Thursday, Mar

[PHP] explode() an array and grep out a string

2004-02-07 Thread Bobby R . Cox
sUsername/*"); Any idea why that may be? This is where the array is exploded: if ($sessSubAccounts) { $accounts = explode("|", $sessSubAccounts); while ($i < count($accounts) - 1) ?> TIA

[PHP] ldap_add - Error number 65: Object class violation

2004-02-06 Thread Bobby R . Cox
echo "An error occurred. Error number " . ldap_errno($connection) . ": " . ldap_err2str(ldap_errno($connection)); } I am beating my head trying to figure this one out. I know it's an object class violation, but I can

Re: [PHP] Dynamic Multi Dimensional Arrays

2003-09-09 Thread Bobby Patel
Brad Pauly wrote: $HTTP_SESSION_VARS[$user]['options'] = $options; yes this is what I wanted. You could then add elements to this array like this: $HTTP_SESSION_VARS[$user]['options']['registered'] = 1; Is that what you are trying to do? - Brad I will try this out and see what happens. Thank y

[PHP] Dynamic Multi Dimensional Arrays

2003-09-09 Thread Bobby Patel
er][$options] = 'registered'; which gives: $HTTP_SESSION_VARS['Bob'][ [income]=1, [age]=25 ] = 'registered'; but this doesn't work. Is there any way I can have "objects" saved in sessions? Bobby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Dynamic Multi Dimensional Arrays

2003-09-09 Thread Bobby Patel
;; which gives: $HTTP_SESSION_VARS['Bob'][ [income]=1, [age]=25 ] = 'registered'; but this doesn't work. Is there any way I can have "objects" saved in sessions? Bobby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: on specific time in the month do script!!

2003-08-07 Thread Bobby Patel
look into executing your php script through cron. (Cron is a Unix schedular and nothing to do with PHP). Or you can use Tash Schedular (on windows servers, I guess). Also, check the archives but I think this issue was answered as above. "Nabil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PRO

[PHP] Re: how to auto create a new page on the fly

2003-08-05 Thread Bobby Patel
functions (fopen, etc...) dump variable into that newly created file and then you are done. If you have questions just post onto the list, but check the filesystem methods and the output buffering methods (ob_start, ob_flush, etc...). Bobby "Dougd" <[EMAIL PROTECTED]> wrote in mes

[PHP] Re: Mail funtion question

2003-07-29 Thread Bobby Patel
I haven't worked with PHP mail for a while, but since no one has responded I'll give you something to consider: 1. Why don't you try error suppression , @ ? or you can set error_reporting down or you can capture all output by using output buffering. 2. You can trap the invalid email, but it may be

Re: [PHP] PHP should know my data!

2003-07-25 Thread Bobby Patel
aid with a grain of salt. Anyways, it's good to see some light humour after see that extremely long eye sore of a thread. Have a good one. Bobby > Cheers, > Rob. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP should know my data!

2003-07-24 Thread Bobby Patel
auto-populate data, as in putting in mock data depending on column type? or transferring data from another data source. If the former, you can look at 3rd party sources (I think I saw one from winSQL), if the latter you can convert any data source to a (tab, comma, etc.) delimeted file which you c

[PHP] Re: PHP webpage like MySQL, PART 2

2003-07-24 Thread Bobby Patel
ct. HOWEVER, if you need to just let the user edit 1 row, what you have is fine all you have to do is pass the id number thourgh a HTML hidden field. So when you pull the rest of the fields and spitting out HTML spit this out somewhere in between the tags :: Bobby "Matt Hedges" <

[PHP] Re: PHP Webpage like MySql- need to be able to see all fields and edit

2003-07-24 Thread Bobby Patel
You could look at a nice GUI package that does all the database modifications , its called phpMyAdmin (www.phpmyadmin.net). But maybe this is too extrememe to what you want. "Matt Hedges" Hello. I am building a webpage for a sorority- http://www.ole

[PHP] Re: Hiding URL's...

2003-07-24 Thread Bobby Patel
can do the update query after the echo $contents, but I don't think that will help). That's my $0.02 Bobby "Tristan Pretty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] com... > I read this article, and thought it was perfect for me... Just the same > prob

[PHP] Re: Value for entire file

2003-07-17 Thread Bobby Patel
ink), GET array is not global so to get this value you have to declare the array global example function some_function () { global $_GET; echo $_GET['year']; } NOT function some_function () { echo $_GET['year']; } Bobby "Uma Shankari T." <[EMA

[PHP] Re: Input Submi Help

2003-07-17 Thread Bobby Patel
, then you pull that script (either page1.php or page2.php). Note: The name attribute of the submit button must match in the POST array and also are case sensitive. Bobby "Matt Palermo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a script that contain

[PHP] Re: differences in session handling between 4.1.1 and 4.3.1

2003-06-28 Thread Bobby Patel
maybe compare the php settings for both servers (using phpinfo()). Also check the register globals setting. I know this might not be a big help, but it's a start. good luck Bobby "Anders Thoresson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are ther

[PHP] Re: Weird comparison error.

2003-06-28 Thread Bobby Patel
(Int(False)==String(False)) but since the data types don't match that would be False. to get a better reference check PHP.net for 'Bolean Types' , because I think I dodn't explain the double equivalance right, and also it will clarify situations of the Null type. Bobby &qu

Re: [PHP] Newbie and learning

2003-06-28 Thread Bobby Patel
I wanted to attach one more point (esp. since this is an ecomm solution), you should also check your POST variables (in addition to the GET varaibles) to make sure they are clean and what are expected. It's not that hard to change posted values. Bobby "Daniel J. Rychlik" &l

[PHP] Re: session handling works on local server, but not when uploaded to ISP

2003-06-28 Thread Bobby Patel
); ie. Maybe line 5 is causing a warning? After you have error_reporting on full you may be able to solve the problem on your local server. For more info checkout error_reporting() on php.net Bobby "Anders Thoresson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi,

[PHP] Re: Array Dump

2003-06-27 Thread Bobby Patel
look at strlen() at php.net "Daniel J. Rychlik" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hmm, I just noticed that array dump counts the number of charaters and white space and lables that number string... What function name is that ? The string counter I mean ? -Dan -- PHP

[PHP] Re: nl2br and

2003-06-27 Thread Bobby Patel
e able to overide that. Maybe this is not the post you were looking for, anyways my 2 cents. Bobby "Raymond C. Rodgers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm sure that this has probably been discussed before, but I couldn't > se

[PHP] Re: Query mysql highest id number

2003-06-22 Thread Bobby Patel
you can you the Mysql MAX function, I believe Select Max(ID) from Table; Also, you may want to look at PHP's mysql_insert_id(), (if you are trying to find the id number after an insert (if that's what you want)). "Chris Schoeman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I wa

[PHP] Re: file downloading

2003-06-19 Thread Bobby Patel
create a script getFile.php when this is called first update the database, then using header you can stipulate what type of document it is and it will prompt for download for example for a Word document Notes: make sure you don't echo anything before the headers even suppress any errors that m

Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread Bobby Patel
Isn't Call-time pass-by-reference the following $variable = myFunction1(&$x); Where myFunction1() is defined as function myFunction1($x) Where as pass-be-reference is called as $variable = myFunction2($x); Where is defined as function myFunction2 (&$Obj); I think the latter is better anyways, be

Re: [PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
Yes that's right. this was just from the top of my head and it's early for me. it should be $report .= "key:".$index." => ".$value."\n"; as Dan has pointed out. "Dan Joseph" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > > $report = "key:".$index." => ".$value."\n"; > >

[PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
$setup_filename = "/path/to/file/on/the/server/"; $fd = fopen($setup_filename , 'a'); #a for appending to file, w to write from the beginning checkout php.net for more details on fopen $report = ""; # #Apply any re-ordering of the Post array here to you 'logical' order # look at the manual for

[PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
What kind of 'logical' order do you need for the Post array? To clarify: Do you need to write to a file the POST variables passed to the script? "Kyle Babich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have a form (setup.php) that passes values to processSetup.php when they ar

[PHP] Re: Pipe $var to a shell command

2003-06-13 Thread Bobby Patel
maybe try exec? $instruction = "$myOutput > command "; # for piping (as I recall) I used to do the input from the right, but I don't think that will make a difference exec ($instruction); Bobby exec ("command "Tim T" <[EMAIL PROTECTED]> wrote in message ne

[PHP] Re: General question...

2003-06-12 Thread Bobby Patel
You can try using the cURL package with PHP. I use it with a system call. $curl_path = /usr/bin/curl; # or full path of curl $post = 'amount=3.40&merchant_id=2351235'; #POST key value pairs with &, these variables will be POSTed to site $command = "$curl_path -d \"$post\" $gateway_url"; exec($

[PHP] Re: REDIRECT

2003-06-07 Thread Bobby Patel
not with php directly, but you can do that with HTML meta tags, check google for "Meta refresh" "Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anybody know of a way to redirect to another page once you have already > outputted html to the screen. In other words, I want

[PHP] Re: How do I display new lines in a textearea?

2003-06-06 Thread Bobby Patel
this is discussed in the posted comments under the function section of nl2br on php.net. But from what I remember there is no br2nl() (unfortunately). just goto php.net/nl2br and search the posted comments for br2nl Bobby "Petre Agenbag" <[EMAIL PROTECTED]> wrote in mes

[PHP] Re: Text file breaking!

2003-06-05 Thread Bobby Patel
try this $string = ereg_replace ('\r\n|\n|\r', '', $string); OR $string = nl2br($string); NOTE: for me the first case will remove the newline, whereas the second will keep them (It might be becuase of my old php version [4.06]?) "Zavaboy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTE

[PHP] (no) file creation by convert (ImageMagik)

2003-06-05 Thread Bobby Patel
f I run it from the command line (as httpd or any user) it works. Bobby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Bobby Patel
I agree that you can write secure scripts with register_globals set to ON. I usually think that alot of rookie PHP programmers (I just started PHP a year ago, myself) read the list, and the way I figure is that it is good to make readers of the list aware of the issues of register globals. Plus,

[PHP] Re: Using register_globals

2003-06-05 Thread Bobby Patel
hp.net for register globals and the warnings associated with it. Bobby "Todd Cary" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have noticed that quite a few applications are designed with the > assumption that "register_globals = Yes"; in o

RE: [PHP] sound

2003-05-30 Thread Bobby
I know that...i'm just curious if somebody knows of a bit of php code outside of the usual html embed src and background tags for sound on a webpage...and I'm trying to avoid having to add flash unless I have to...but yes that is an option Thanks -bobby > -Original Message- &

[PHP] sound

2003-05-30 Thread Bobby
Does anybody know of a way under php to add a background sound to a webpage...i have sound on my page when it's local but as soon as I copy it to the server, nothing :( thanks -bobby Bobby Brooks [EMAIL PROTECTED] http://bobby-brooks.com Public Key = bobby-brooks.com/pubring.pkr Simu

[PHP] Re: Create Links on the fly?

2003-05-29 Thread Bobby Patel
l get back to you. Bobby "Chase" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Salutations! > > I am trying to do something fairly simple, but I can't seem to make it > work... I want to have a form field on a page that the user will put in a 3 >

[PHP] RE: [newbie] drop down boxes

2003-04-06 Thread Bobby Rahman
Hiya, I have created a dynamic table within my form. Above the table I want to insert a filter to order by: Here is the static list: Severity Crash Major Minor Review What I need suggestions on is: 1. recommended tutorials on list

Re: [PHP] RE: newbie alternate row colours in dynamic table

2003-04-05 Thread Bobby Rahman
Hiya people After a lot of soul searching, exploring the web and help from many people I came up with this simple solution: Thank you Chris for explaining the toggle $colorset. In the end I decided this made life alot simplier. (clearly the brackets have to be correctly aligned) while( $row

[PHP] RE: newbie alternate row colours in dynamic table

2003-04-05 Thread Bobby Rahman
Hiya I have a dynamic table and am trying to get the rows to be two different alternate colours. well Ive looked at a couple of snippets of this colour code and previous mails regarding this. Im having major troubles intergrating any of these suggestions with my code. Can anyone suggest where

[PHP] RE: newbie Dynamic Drop down lists using mysql

2003-04-03 Thread Bobby Rahman
Hiya Im looking for any tutorials/snippets of code to show me how to code a dynamic drop down box/list in a php form. e.g a drop down menu of all current users (I assume this will need to connect to mysql db and select all usernames from table user and place in the menu. here what I have so

[PHP] RE: [newbie] embed php in html file

2003-04-03 Thread Bobby Rahman
Hiya I need advice for an optimum solution to display the username that is logged in on every html form page of my application. I have a header.php : session_start(); echo "Logged in as: ".$_SESSION['curr_user'].""; ?> Now I have many html forms which user's see What I want to know is how t

[PHP] [Newbie] Password()

2003-03-31 Thread Bobby Rahman
Hi, in my code I am trying to send an email (containing a password) to a user when he has forgotten his password. The problem is that security leads to needing to encrypt passwords in the database. Im using the password function within mysql. Is there any way of reversing the password functi

[PHP] RE: (newbie)calling GLOBAL arrays

2003-03-23 Thread Bobby Rahman
Hiya Im having difficulties calling array values from outside script. I have db.api.php $username = $row[0]; $password = $row[1]; $email = $row[2]; echo "THE USERNAME IN DB.API IS $username"; echo "THE PASSWORD IN DB.API IS $password"; echo "THE EMA

Re: [PHP] Re: Missing session vars when doing var_dump()

2003-03-20 Thread Bobby Patel
and I never had a problem. I'm out of ideas now. "Gavin Jackson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Bobby > > The following is a copy and paste of the page I'm using to > generate the problem. I have 18 keys in the $_SESSION &

Re: [PHP] Re: Missing session vars when doing var_dump()

2003-03-20 Thread Bobby Patel
Are the queries the exact same every time you refresh them? This seems just to be programming logic (I guess). Post some code and maybe someone (or I) will be able to help you out. "Gavin Jackson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks for your in

[PHP] Re: Missing session vars when doing var_dump()

2003-03-20 Thread Bobby Patel
I would think that they are 16 key/value pairs when the MySQL (TEXT) fields are null thus the session variables are NOT set thus NOT present. Hypothsis: I believe that your are using mysql_fetch_array($query_resource), try using the second parameter as well ie. mysql_fetch_array($query_resource, T

Re: [PHP] Passing variable from webpage to php (newbie?)

2003-03-20 Thread Bobby Rahman
Hiya It could need setting register_globals =on in your php.ini if after that still problems then you may need to look into sessions and in particular session_start() and $_SESSION['varname'] and make sure the variables are global so that more than one script can use them. Hope this steers you

[PHP] Re: Passing variable from webpage to php (newbie?)

2003-03-19 Thread Bobby Patel
You have register_globals set to off (read up on "register globals" in php.net). your code should read $HTTP_POST_VARS['action'] or $_POST['action'] (depending on PHP version) INSTEAD of just $action. so to test an if:: if ($HTTP_POST_VARS['action']==1) { /* Code for if action is equal to 1 */ }

[PHP] RE: (newbie) how to redirect to html page from php

2003-03-17 Thread Bobby Rahman
Hiya I have a login_screen.html which on submit is sent to login.php. Login.php does all the checking of usernames and passwords. I am trying to to produce this logic: //In login.php if password and username correct { go to main page } else { go back to login.screen.html echo "Please try again"

[PHP] Re: SMTP Authenticate

2003-03-15 Thread Bobby Patel
There is another php mailer class which is really good (and includes authentication among alot of other things). http://phpmailer.sourceforge.net "Aitor Cabrera" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I'm trying to use the mail() funtion but I can only use this funtion th

[PHP] RE: newbie OOP?

2003-03-14 Thread Bobby Rahman
Hiya I am new to PHP and was wondering whether to develop small applications (20 pages ) is it worth it to use OOP? Can any recommend any books or URLS that explain Object orientated programming and design in detail. I have read articles in www.phpbuilder.com and www.phppatterns.com. In part

[PHP] Re: Setting session variables from value in database

2003-03-13 Thread Bobby Patel
are you sure that $row['user_type'] has a (non-null) value? "Mike Tuller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a login page and have sessions working so that if a user is in > the database, they can login. I want to also add a "user_type" to the > session so that I

[PHP] Re: Page Rederection Problems

2003-03-13 Thread Bobby Patel
> header("location: http://www.website.com "); I usually use header() like this : header("location: http://www.website.com";); you can try that, maybe it might work. "Kelly Protsko" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Basically what I am doin

[PHP] Re: need help with parsing form input ...

2003-03-11 Thread Bobby Patel
eregi_replace("[^[:alnum:].]", "", $string_val); notice the period after the first closing brace. "Kenn Murrah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks ... one more thing: is there a way to modify this to allow a period > (dot) to included, as well as the alha and

[PHP] Re: Checking for Null Variables

2003-03-07 Thread Bobby Patel
you can look at isset() and empty(). If you retrieve the query result with Mysql association (ie. $field=mysql_fetch_array($resource, MYSQL_ASSOC), then even the field has a blank value, there will be a blank variable created ($field["Name"] is created but with no value)), however if you grab the r

[PHP] Re: Scroll through values sent from a form

2003-03-04 Thread Bobby Patel
$fields=''; $values=''; foreach ($_POST as $field -> $value) { $fields .= $field.", "; $values .=$value.", "; } $fields = substr ($fields, -2); // strip off last comma and space $values = substr ($values , -2); // strip off last comma and space $query = "INSERT INTO $_GET[table_name] (".$

[PHP] Re: date range assistance needed

2003-03-03 Thread Bobby Patel
I believe PHP and MySQL use two different definitions of the start of a time stamp. One uses 1974 the other 1900 (I don't know exactly). If you echo strtotime($attributes[startdate]) , UNIX_TIMESTAMP (datestamp) Also, in your query you are looking for all headlines that have strtotime($attributes

[PHP] Re: All Code Executing Even After header() Redirect

2003-03-03 Thread Bobby Patel
Add an exit statement after the header call. But I thought the same thing that after header nothing would be executed. if (!LoggedIn()) { // If not logged in, take to Login page. header("Location: /login.php"); exit(); } I just gave you this soultion to solve your prob

[PHP] Re: Creating MySQL Entry Forms

2003-03-01 Thread Bobby Patel
What I would recommend is PHPmyAdmin. I believe it's open source and written in PHP specifically as a utility for mySQL. I'm sure you can find it at sourceforge.net (or a similar site) . "Jeremy N.E. Proffitt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I need to create some simpl

[PHP] Re: Value of $var as a variable?

2003-02-24 Thread Bobby Patel
function getID($variable){ return $HTTP_GET_VARS[$variable]; } "Patrick Teague" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I know I've seen something about this (I can't remember whether yea or nay), > but I can't remember where I found it as at the time I was looking for > s

[PHP] Re: Efficient db connect function?

2003-02-23 Thread Bobby Patel
L the scripts that will need to connect to the database, so make an include file with 2 things (connecting and selecting a database). Then make another function just for queries, this way on the second and onward queries will save overhead some from connecting and selecting a database. bobby &qu

[PHP] Re: Passing emails to database

2003-02-19 Thread Bobby Patel
I have an idea that might work in theory. Provided that you have php running on a Unix based OS. You could forward all emails to an email that sits on a Unix server. There they are stored as plain text files, then just parse what you need on a daily basis and truncate that file to 0 bytes. BUT it

[PHP] RE: traversing and displaying directories in html [newbie]

2003-02-17 Thread Bobby Rahman
Hiya I am trying to find a way to drill down on html file names, if there are directories to display the files in the new directory. Im assuming this needs the calling of the same page which displayed the intial file names again with the argument of new directory. Does anyone have any tips f

[PHP] Re: File not rewritable - why? Help needed.

2003-02-11 Thread Bobby Patel
Are you on a Windows platform, or *nix. I would assume *nix since you mentioned chmod. what did you chmod the file to? who owns the file? and what user does PHP run as (maybe nobody, or httpd)? Just to get it to work chmod the file to 777, BUT this is a security risk. MAKE SURE this file is NOT in

[PHP] Re: Session Time

2003-02-10 Thread Bobby Patel
What you could do, is get the current time stamp using time() or date() and create a sesion variable with this value, when they login (and the session is created. Then when they logout, and the sesion is destoyed get the current time stamp again and minus it from the start time. Note: This requir

[PHP] Re: Read file and get what i want

2003-02-06 Thread Bobby Patel
Check out explode() $file // say this variable has your file contents $lines = explode ("\n", $file); // lines contains each line of the file foreach ($lines as $line -> $content) { if (strrpos($line, ':')) { $values = explode (':', $content); echo "The first value is : ".$valu

Re: [PHP] php pages broken after moving to a newer version

2003-02-05 Thread Bobby Patel
try looking at the status of register_globals on both versions. "Chip Wiegand" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jason Wong <[EMAIL PROTECTED]> wrote on 02/05/2003 12:49:16 PM: > > > On Thursday 06 February 2003 04:41, [EMAIL PROTECTED] wrote: > > >

[PHP] Re: Array find a element

2003-02-04 Thread Bobby Patel
look at array_key_exists "Narciso Miguel Rodrigues" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is possible to do something like > > if ($username in $users) ... or i need to do a foreach($user){...} > > Thks > > [MsR] > -- PHP General Mailing List (ht

[PHP] Re: Session Variables

2003-01-26 Thread Bobby Patel
This variable is registered in the Session, and the variable isn't active until the page refreshes. It's hard to explain. I thought I would try. There are some things you can do. If you need the variable right away, you can do this: if (isset($HTTP_SESSION_VARS["user1"])) { $user1 = $HTTP_SESS

[PHP] Re: File upload problem

2003-01-21 Thread Bobby Patel
Since you have 'safe-mode' on, Register globals will be turned off, so you should test $HTTP_POST_VARS['Submit'], instead. "John M" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I have the code below. It's a simple file upload. But it doesn't work. >

[PHP] Re: Multiplication of double

2003-01-19 Thread Bobby Patel
It seems you have register globals set to off, thus when you have variables $price and $qty they are just fresh variables, you might try $HTTP_POST_VARS['price'] and $HTTP_POST_VARS['qty'] (don't forget the single quote). "Cesar Aracena" <[EMAIL PROTECTED]> wrote in message 01c2bfeb$cecbd5c0$

[PHP] Re: passing variables to a sql statement

2003-01-18 Thread Bobby Patel
It seems that error is from an ill-formed MySql statement. Try this, $descripQuery = "SELECT descrip from project_descrip where rowid=$foo"; echo $descripQuery ; // put in this echo after the query. $descripResult = mysql_query($descripQuery); echo mysql_error(); file://put this echo after query ex

[PHP] Re: Auto Incrementing in PHP

2003-01-18 Thread Bobby Patel
One quick note, if you DO NOT have access to a database, you could store that incremented number to a file. And open and retrieve, and increment every time you need. If you need to take this approach checkout php.net and search for "fopen". "Don Mc Nair" <[EMAIL PROTECTED]> wrote in message [EMA

[PHP] Re: hyperlink and mySQL

2003-01-18 Thread Bobby Patel
I have done something similar: write a script that takes an Article ID, and displays the text. So to displat article #3, you would call it like getArticle.php?id=3. Skelton for getArticle.php - take id and store in $id - Select FullBody from Articles where ID = $id - $body = query['FullBody'] - the

[PHP] Re: Question about using session and "logging out"

2003-01-17 Thread Bobby Patel
says that the page is expired and must be refreshed. Maybe you can get that behaviour, so that when someone hits back, they have to refresh. Bobby "Don" <[EMAIL PROTECTED]> wrote in message 020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd

Re: [PHP] Re: Images : Store in dB or disk?

2003-01-17 Thread Bobby Patel
That makes sense. When Marek explained it I didn't realise that IMG tags can't use the raw data, and needs to make a seperate HTTP request for the Headers. Now, I understand. Unfortunately the desicion has been made to go with the database. Oh well, I can always code the scripts to store and grab

[PHP] Re: Images : Store in dB or disk?

2003-01-16 Thread Bobby Patel
Your approach is reasonable. I guess I will have to judge for myself! "Bobby Patel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > I have the Images table setup with columns (width, height, size, type, > etc...) the qu

Re: [PHP] Images : Store in dB or disk?

2003-01-15 Thread Bobby Patel
mages are stored in the filesystem > > Don't worry about what it looks like - I extracted this from the frameset it goes in > > Cheers! > > RW > > Quoting Bobby Patel <[EMAIL PROTECTED]>: > > ### Hello, > ### I have the Images table setup with columns (wi

[PHP] Images : Store in dB or disk?

2003-01-15 Thread Bobby Patel
Hello, I have the Images table setup with columns (width, height, size, type, etc...) the question is should I have the image data stored in this table or disk? I know, alot of people have said it is faster in disk, which is 1 page I/O. But I need these images for displaying product pages, and I b

[PHP] Re: Template tutorials?

2003-01-10 Thread Bobby Patel
Hey, I have been using HTMLTMPL http://htmltmpl.sourceforge.net/ So far it works well, and emulates the more powerfull Perl Templating system. It seems alot of code, but whips up these templates in good response time (of course, it might be becuase I work on a unstressed server). "Chad Day"

Re: [PHP] emulate Post with redirect

2003-01-06 Thread Bobby Patel
IL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Monday 06 January 2003 14:01, Bobby Patel wrote: > > Hello, I want to emulate a POST request to Paypal. Originally a POST > > request is sent from the user (through a form) and the user is red

[PHP] emulate Post with redirect

2003-01-05 Thread Bobby Patel
Hello, I want to emulate a POST request to Paypal. Originally a POST request is sent from the user (through a form) and the user is redirected to paypal's site. Now, what I want to do is to emulate a POST request (so that the surfer can't see some of the hidden fields of the form) and to deter tamp

[PHP] emulate full post wth redirect

2003-01-05 Thread Bobby Patel
Hello, I want to emulate a POST request to Paypal. Originally a POST request is sent from the user (through a form) and the user is redirected to paypal's site. Now, what I want to do is to emulate a POST request (so that the surfer can't see some of the hidden fields of the form) and to deter tamp

[PHP] Combine sockets and Header()

2003-01-05 Thread Bobby Patel
Hello, I want to emulate a POST request to Paypal. Originally a POST request is sent from the user (through a form) and the user is redirected to paypal's site. Now, what I want to do is to emulate a POST request (so that the surfer can't see some of the hidden fields of the form) and to deter tamp

Re: [PHP] Password Script

2002-11-28 Thread Bobby Patel
If you have access to a database on your server then you can do the following: - user logs in to site (user enters unique username and password) - once in they will be displayed with the 3-6 Questions - after they answer the questions they hit submit which sends it to a PHP script - the PHP script

[PHP] Re: dynamic variable headache

2002-11-08 Thread Bobby Patel
try this: $mmdd = "$foo.$bar.$bleh.$doh"; /*note double-quotes and the concat operator (the period) */ $$mmdd = a_date_value; To test; echo $mmdd ; echo $$mmdd; /*provided that a_date_value is a string literal*/ Robert McPeak <[EMAIL PROTECTED]> wrote in message news:sdcbab6c.0

[PHP] Office XP pro - email attachments

2002-10-24 Thread Bobby
Hello, I know XP (argh...) Anyways, I written a script where a user can upload a gif or jpeg and then I email it to an email address. Now, everything works fine, the reciever can view the attachments in Squirell Mail, Outlook Express, and Outlook (both are Office 2000 versions). But under outlook

Re: [PHP] Problem with function declaration in include files

2002-01-04 Thread Bobby
ed Cheers ---- Bobby "Dennis Moore" <[EMAIL PROTECTED]> wrote in message 003501c19526$a0968740$[EMAIL PROTECTED]">news:003501c19526$a0968740$[EMAIL PROTECTED]... The problem is most likely with your include statement.

  1   2   >