[PHP] Help - I'm New

2002-07-02 Thread admin
Hi, first let me introduce myself... My name is Kit, and I own the domain below and host sites from off that domain. I'm new to using PHP...and need some help. 1. I have apache for win32 1.3.26 setup on my w2k pro at home, and need to know how to enable PHP in the config. 2. I also have a

[PHP] help with PHPwebsite

2002-07-02 Thread admin
I get the following error when i try to install an app called PHPwebsite ( http://phpwebsite.appstate.edu/ ) Warning: Cannot add header information - headers already sent by (output started at C:\apache\htdocs\php\setup\index.php:9) in C:\apache\htdocs\php\htmlheader.php on line 30 I also

[PHP] FW: help with PHPwebsite

2002-07-03 Thread admin
I get the following error when i try to install an app called PHPwebsite ( http://phpwebsite.appstate.edu/ ) Warning: Cannot add header information - headers already sent by (output started at C:\apache\htdocs\php\setup\index.php:9) in C:\apache\htdocs\php\htmlheader.php on line 30 I also

[PHP] T_string error

2002-07-09 Thread admin
Can someone tell me what the following error means, and how to fix it...please? Parse error: parse error, unexpected T_STRING in c:\program files\apache group\apache\htdocs\phpbb\language\lang_english\lang_main.php on line 629 this is the code on that page: $lang['Avatar_filesize'] = 'The

[PHP] crontab programmed with mysql ??

2002-09-02 Thread admin
I'm looking for the approximate solution of mailing out (or doing anything else ) timed by cron(tab) along with use of mysql as means of identification and storing of the dates in multiuser enviroment. Initial date and interval of recurring event is to be set up by a user. May you know some open

[PHP] PHP to embed font

2001-08-14 Thread admin
Is there anyway to use PHP to embed font types into web pages to the person visiting the page sees what you want them to even if they dont have the same fonts on their computer. Pat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP] Web page authentications

2001-08-14 Thread admin
I am new to PHP and am confused on HTTP authentications. I have read that section in the manual and still have questions. Where does PHP look to see if the user is valid or if the passward matches the user. How do you use PHP to set up user registration so users can input their information for

[PHP] EO - New FREE web development engine

2001-07-17 Thread admin
Hello, I'm contacting you because we have recently released a new web development platform, EO, that I would like for you to try out for use in building dynamic sites. EO is a portable, flexible yet robust system that you can use to quickly build interactive sites, plus it has features that

RE: [PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread admin
I simply do this $file=/home/images/index.html; $output = fopen($file, w); -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Colin Guthrie Sent: Monday, November 05, 2007 4:06 AM To: php-general@lists.php.net Subject: [PHP] Re: How do I specify a local file for

RE: [PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread admin
I would like to change my answer to that question. Due to my lack in desire, to read the entire email at first I have made a bad judgment error in exactly what you was trying to do. Yes trying to open a file on your local computer from the server is not a good idea. HOW EVER. There are many

RE: [PHP] explorer

2007-11-10 Thread admin
You can't (SERVER vs Client) you cannot make Php open an program on the client computer. If you want to get a file from your computer that is a simple HTMLTag. input type=file name=image tabindex=1 size=35 / Please explain if that is not what you meant. -Original Message- From: kNish

RE: [PHP] Cannot send a hyperlink

2007-11-11 Thread admin
The Answer is quiet simple. $E_MAIL = [EMAIL PROTECTED]; $to = [EMAIL PROTECTED]; $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= To: Their Name[EMAIL PROTECTED] \r\n; $headers .= From: your email [EMAIL PROTECTED]\r\n; $link =

RE: [PHP] Cannot send a hyperlink

2007-11-11 Thread admin
Brad I'm sorry. Instead of insulting you and telling you to go read a book I simply explained an option. Yes you do not need quotes in the mail() function. As for the declared variables I was trying to show you an example. You will find many explanations for how or what is best practice.

RE: [PHP] What to do when flush() doesn't?

2007-11-11 Thread admin
ob_flush();Flush(); works for me. -Original Message- From: Jon Westcot [mailto:[EMAIL PROTECTED] Sent: Sunday, November 11, 2007 5:31 AM To: PHP General Subject: [PHP] What to do when flush() doesn't? Hi all: I am trying to get information from a rather long-running PHP script to

RE: [PHP] Trigger an action on session timeout - feature request?

2007-11-12 Thread admin
You could simply validate the user with session_start(); $tbaged = false; if (isset($_SESSION['user_id'])) { $user = new User($_SESSION['user_id']); $tbaged = true; else { $login = $_REQUEST['screename']; $password = $_REQUEST['pword']; $login = clean($login); $password =

RE: [PHP] Fwd: Returned mail: User unknown

2007-11-12 Thread admin
PLEASE I have like 50 from it so far. -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED] Sent: Monday, November 12, 2007 5:31 PM To: php-general List Subject: [PHP] Fwd: Returned mail: User unknown Can an admin or mod please force an unsubscribe on [EMAIL PROTECTED

RE: [PHP] web page download question

2007-11-12 Thread admin
http://www.catavitch.com The Script I have written actually does that for predefined websites. The content is LIVE pull directly from the website listed. MOST important thing to remember GET PERMISSION to scrape as you call it. I can store the data if I want or dish it up in the example. I can

RE: [PHP] Run process in background

2007-11-14 Thread admin
You need to run wget from a cron job. -Original Message- From: Viacheslav Chumushuk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 14, 2007 9:10 AM To: php-general@lists.php.net Subject: [PHP] Run process in background Hello. I want to run process from my php script in

RE: [PHP] I need help handling form posting

2007-11-15 Thread admin
I do this Example: ? switch($_REQUEST['req']) { default: $click_stamp =date('is'); echo form action=? method=postinput type=hidden name=clicks value=$click_stamp input type=file name=upfile tabindex=1 size=35 input type=submit value=upload name=req/form; break; case upload: //Upload function

RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread admin
Understand your syntax issue has nothing to do with the mail function its self. That was an Operator headspace Issue. Including links in email is not hard your entire email structure was BLOWN UP... For you to even submit that to php.net is useless. A. No one is going to post that. Because it has

RE: [PHP] bank query and curl

2007-11-17 Thread admin
WHY! Would you even want to pull that data first off? It would be out dated as of the next transaction anyway. Secondly if you can curl the data from the server, and get your account information! I suggest you change banks. Bad decision I think to make this attempt. You can bet I will be

RE: [PHP] Another form handling posting question

2007-12-05 Thread admin
? if($_POST['process'] == Pass){$action = success.php;}ELSE{$action = recursive.php;} echo form method='POST' action='$action'; ? I am trying to recursively send data to the same form. Based on the data, I want to determine which action is to be processed. It appears that the $_POST is

RE: [PHP] Another form handling posting question

2007-12-05 Thread admin
Or try ? echo form action=;if(($_POST['process'] == Pass) || ($_POST['process'] == )){echo success.php;}ELSE{echo recursive.php;}echo METHOD='post'; ? There are a 1000 and 1 ways to make the script smaller yet still produce the same effect. Remember there is no reason to declare the POST

RE: [PHP] Securing your Sites

2007-12-17 Thread admin
I want to personally thank you for 6 hours of work to remove the PHP-Back-door Trojan, that download from your site to my PC while viewing that POS you call a help line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Connecting to MySQL database

2007-12-26 Thread admin
First I suggest you see if MySQL is even running. Terminal Window type the following service mysqld status If it is running Great now you need to check your connection string for Errors. Not running do this * Terminal Window service mysqld start If you have an error in the setup it

RE: [PHP] Security scanner

2008-02-11 Thread admin
Injections only work on sloppy code. If you are using globals you are asking for injections. Turn your globals off, use $_POST[var_name] and filter all user input. Just my opinion, I am sure some will disagree. Richard L. Buskirk ## Show me a man with no fear, I will point out the date on his

[PHP] DBR.php ???

2008-02-11 Thread admin
As much as I admire Daniel, I think who ever sent me this question needs to rethink thier naming convention. On Feb 9,2008 12:47 PM, WHOAMI [EMAIL PROTECTED] wrote: Would you use this to server auth? if($_REQUEST['from']!=1567d5af328786cdc81ed0f456bf) { $DanielBrown_rules =

Re: [PHP] DBR.php ???

2008-02-11 Thread admin
No clue Daniel, was sent to me directly using a non returnable email. I had to post it here because it had your name all over it. I agree not your style at all. Just beware another name for fan is (Stalker). lol Rich. On Feb 11, 2008 11:19 AM, [EMAIL PROTECTED] wrote: As much as I admire

[PHP] group by on mssql_query

2008-02-14 Thread admin
$ford = mssql_query(SELECT name FROM Table GROUP BY name); while($mustang = mssql_fetch_array($ford)) { echo $mustang['name'] . /n; } OS 2003 Server PHP 5.2.5 Apache 2.2.8 SQL 2000 For some reason it is NOT clicking what I am missing here. Second set of eyes please -- PHP General Mailing

Re: [PHP] group by on mssql_query

2008-02-14 Thread admin
Column 'location_city.dst' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Not fimilar with MSSQL to be honest. On Thu, Feb 14, 2008 at 4:00 PM, [EMAIL PROTECTED] wrote: $ford = mssql_query(SELECT name FROM Table GROUP BY

Re: [PHP] group by on mssql_query

2008-02-14 Thread admin
Sweet Mother it just clicked. I got it thank you dan. On Thu, Feb 14, 2008 at 4:00 PM, [EMAIL PROTECTED] wrote: $ford = mssql_query(SELECT name FROM Table GROUP BY name); What do you see when you replace the above line with this? $ford = mssql_query(SELECT name FROM Table GROUP BY name)

Re: [PHP] Re: mysql input

2008-02-19 Thread admin
Filter the data $data = str_replace(', , $data); I am sure there are many ways to filter the data before insert. (If you are SURE you have A.D.D. then it wont matter what I say to you.) Rick B. On Feb 18, 2008 11:24 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: nihilism machine wrote:

[PHP] MySQL Stored Procedures

2008-02-19 Thread admin
I want to thank all who helped me on this issue. My Problem was when I tried to return a parameter to the C++ script. CREATE PROCEDURE `tracinsert`(CaldNumber varchar(12), CaldTime varchar(50), CallerID varchar(12)) BEGIN INSERT INTO IncCalls (CaldNumber, CaldTime, CallerID) VALUES

[PHP] calling parent class method from the outside

2007-07-02 Thread admin
Inside the body of method foo() you can of course use syntax like parent::foo(). But is there a way to call the parent version of obj-foo() outside the class? That kind of syntax is allowed in C++, for example: Aclass a; if (a.Aparent::foo()) ...; Some contrived example to illustrate the point:

[PHP] Re: calling parent class method from the outside

2007-07-02 Thread admin
Colin Guthrie wrote: admin wrote: Inside the body of method foo() you can of course use syntax like parent::foo(). But is there a way to call the parent version of obj-foo() outside the class? That kind of syntax is allowed in C++, for example: Aclass a; if (a.Aparent::foo()) ...; [snipped

Re: [PHP] calling parent class method from the outside

2007-07-02 Thread admin
Jochem Maas wrote: another solution for the OP might be (although I think it goes against all design principles): class A { function foo() { echo achoo\n; } } class B extends A { function foo() { echo cough\n; } function __call($meth, $args) { $func = array(parent,

Re: [PHP] Re: calling parent class method from the outside

2007-07-02 Thread admin
Jim Lucas wrote: Rihad wrote: Now will you mentally copy and paste the above code several times, doing the necessary text substitutions, what will you get? Three identical copies of doSetColumn() in each class! And the real doSetColumn() is a bit heavier than a one-liner. We come full

Re: [PHP] calling parent class method from the outside

2007-07-02 Thread admin
Jochem Maas wrote: admin wrote: Jochem Maas wrote: another solution for the OP might be (although I think it goes against all design principles): class A { function foo() { echo achoo\n; } } class B extends A { function foo() { echo cough\n; } function __call($meth, $args

Re: [PHP] calling parent class method from the outside

2007-07-03 Thread admin
Jochem Maas wrote: admin wrote: Jochem Maas wrote: ... the 'callback' type has a number of forms: 'myFunc' array('className', 'myMeth') array(self, 'myMeth') array(parent, 'myMeth') array($object, 'myMeth') self and parent adhere to the same 'context' rules when used in call_user_func

[PHP] temp files

2007-07-25 Thread admin
Hi! I have this code: $lines = gzfile(http://www.example.com/some/resource;); for its internal needs gzfile() creates a temp file such as /var/tmp/phpFjJxNX where the gzipped resource is kept. The file stays there forever and eventually the fs runs out of inodes. Any way to unlink the temp

[PHP] temp files

2007-07-25 Thread admin
Hi! I have this code: $lines = gzfile(http://www.example.com/some/resource;); for its internal needs gzfile() creates a temp file such as /var/tmp/phpFjJxNX where the gzipped resource is kept. The file stays there forever and eventually the fs runs out of inodes. Any way to unlink the temp file

RE: [PHP] round()

2007-10-10 Thread admin
While we're entertaining algorithms, has anyone else noticed that php's round() isn't the most accurate algorithm to round? If you will refer to chafy's reply on 28-Feb-2007 06:13 http://us2.php.net/manual/en/function.round.php#73537 The function round numbers to a given precision.

[PHP] preg_match_all Help

2007-10-11 Thread admin
I have tried this many way and for some reason I cannot pull content between the 2 pattern options. function pullchannel($document) { preg_match_all('/div class=channel [^]*(.*)div class=channel [^]*/i',$document,$elements); $match = implode(\r\n,$elements[0]); $match

RE: [PHP] preg_match_all Help

2007-10-12 Thread admin
Okay use this as an example I want put parse the html document and toss everything between the two Div class channels into an array. The problem I am having is that I cannot grab everything in between the Pattern of the preg_match_all. If I preg_match_all('/div class=channel

[PHP] HTML Parse Issue

2007-10-14 Thread admin
I am having a issue parsing an html file. I want to pull all the data between two html tags. Problem I am having is that no matter what I try I can pull either tag or both but not the data in between. div class=record id=one div class=rideon

RE: [PHP] Unsetting a header

2007-10-21 Thread admin
Try this never gives me a problem. I use it to keep proxy servers from caching. ? header(HTTP/1.1 200 OK); header(Status: 200 OK); header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); // Date in the past header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always modified

Re: [PHP] problems with exec()

2006-11-29 Thread admin
Try exec('/path/to/copy', $return); print_r($return); read the manual : http://nl3.php.net/manual/en/function.exec.php Description string exec ( string command [, array output [, int return_var]] ) gr, Thijs On Wed, 29 Nov 2006 23:22:13 -0700, Ray [EMAIL PROTECTED] wrote: hello; I am trying

Re: [PHP] problems with exec()

2006-11-30 Thread admin
Output you will only get if something goes wrong with the copy process. But then again you say the 'whoami' command runs perfect. So the only things that comes to my sleepy brain is incorrect paths or permissions. Tried it here with 5.2 and 4.4.4 and seems to work. Maybe somebody else has a

RE: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread admin
Im not sure I understand the question. Pass control from index.php to welcome.php ??? index.php : ? echo form action=welcome.php method=postinput type=hidden name=tagme value=yesinput type=submit value='Continue'/form; ? welcome.php ? if($_POST['tagme'] == yes){ echo Congrats you are

[PHP] Stored Procedure Question

2008-03-24 Thread admin
I am very aware most of you do not use a stored procedure in mysql. However with my latest C++ programming I have created a few that make life a dream. The issue I am having. When I call the stored procedure I would like the end of the procedure to call or invoke a php script. I have read

RE: [PHP] question about select tag in php

2008-03-31 Thread admin
Code wise your form options are too bulky and you need to look at slimming that down like below. Not that my example is prefect but easier to control the option enviroment. echo select name='city1'; for($d=1; $d=2; $d++) { if($city1 == region$d){ echo option selected

Re: [PHP] Google Pagerank script

2008-03-31 Thread admin
If you do have a index.php file in that directory and you are sure the path is correct check the chmod and chown of the index.php file. Richard L. Buskirk Dont be so -1 cubed. +++ On Sun, Mar 30, 2008 at 12:25 PM, tedd

[PHP] Date Issue

2008-03-31 Thread admin
Not understanding why this is happening. $month = date(F, mktime(0,0,0, date(m), date(d), date(Y))); $zomonth = date(F, mktime(0,0,0, date(m)-1, date(d), date(Y))); echoing out the exact same month March March Checked server timezone/date/time all is good. Am I half asleep at the wheel on

Re: [PHP] Date Issue

2008-03-31 Thread admin
I tried that a big no go. Seems if I do a +1 i get 2 months from now and a -1 gives me the current month. $month = date(F, mktime(0,0,0, date('m'), date('d'), date('Y'))); $zomonth = date(F, mktime(0,0,0, date(m)-1, date(d), date(Y))); $nmonth = date(F, mktime(0,0,0, date(m)+1, date(d),

Re: [PHP] Date Issue

2008-03-31 Thread admin
Thank you again Dan. Thought never crossed my mind the day being the 31st. That fixed it. Richard L. Buskirk On Mon, Mar 31, 2008 at 4:15 PM, [EMAIL PROTECTED] wrote: I tried that a big no go. Seems if I do a +1 i get 2 months from now and a -1 gives me the current month.

Re: [PHP] Date Issue

2008-04-01 Thread admin
Your doing the same thing i did look at date(d) When its the 31 like yesteday of course it can not find the 31 of months that do not have them. Thats why it errored. String worked up till monday which explained alot. I just did not look at what i was doing. changed the code to $zomonth =

Re: [PHP] phone number allocation manager

2008-04-01 Thread admin
I work with and design VIOP IVR Applications, and have probably found or made everything you’re looking for. I can tell who provides database's for free or at a cost the cheapest and if you’re doing ANI cross population I have that as well. WARNING some of the database are around 250 million

RE: [PHP] April Fools Easter Egg

2008-04-01 Thread admin
Studied that thing for last 15 minutes before realizing you got me. Richard L. Buskirk Don't forget to check your phpinfo() page for the annual easter egg. -- Ray Hauge www.primateapplications.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread admin
Insert is for a new row Alter or Update is for an exsisting row /*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in

RE: [PHP] Get Free Information for Top twenty (20) online colleges and universities

2008-04-02 Thread admin
I ask you remove this spammer from our LIST Richard L. Buskirk Senior Software Engineer -Original Message- From: steve_carpenter [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2008 5:14 PM To: php-general@lists.php.net Subject: [PHP] Get Free Information for Top twenty (20)

RE: [PHP] How to get a code review?

2008-04-03 Thread admin
You can simply check the session or cookie if(!session_is_registered(user)) { echo I cant see the session_register user; }else{ echo I see the session $user; } User is an example of a session_register(user); the user variable has been set in the

RE: [PHP] string

2008-04-07 Thread admin
Do a preg match to find one or preg_match_all to find all the john in the string. ?php $name = John Taylor; $pattern = '/^John/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3); print_r($matches); ? $name = John Taylor; I want to verify if $name contains john, if yes

[PHP] Date comparison Question

2008-04-07 Thread admin
I am having a date time comparison issue. I have statically set the values here. But the data is fed from the database, CaldTime is timestamp and since it will not allow me to have 2 timestamps in the same table I set the CallEnd varchar(12). Storing the data they seem to be the same for

Re: [PHP] Date comparison Question

2008-04-07 Thread admin
Yes my mistake was looking at another record and published another. But I figured it out now i can publish 1:45 like i wanted. Having a moment there. Thank you Richard L. Buskirk    On Mon, Apr 7, 2008 at 9:42 AM, [EMAIL PROTECTED] wrote: I am having a date time comparison issue. I have

Re: [PHP] Date comparison Question

2008-04-07 Thread admin
Thank you that is exactly what i did to figure it out. Just was having a brain fart there for a minute. On Mon, Apr 7, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote: t the data is fed from the database, CaldTime is timestamp and since it will not allow me to have 2 timestamps in the same table

Re: [PHP] Date comparison Question

2008-04-07 Thread admin
Dan I made a solution as below. $time1 = strtotime($sqldata[CaldTime]); $time2 = strtotime($sqldata[CallEnd]); $interval = $time2 - $time1; $TLength = date(i:s, strtotime(2008-01-01 01:00:$interval)); Result 01:45 Works perfect for me. Do you agree or disagree dan? On Mon, Apr 7, 2008 at

[PHP] File Format

2008-04-11 Thread admin
Wave editor? Here is my dilemma. In php I have written a script to upload a wave file to the server for the C Sharp application to use. No problems on upload or streaming from the file to the web. My issue comes when the format of the wave file is PCM and not CCITT u-Law. The device cannot

[PHP] Safe mode story

2008-05-10 Thread admin
Hi all, I'm running a Plesk 8.3 mass hosting server equipped with PHP 5.1.6 on CentOS 5, and I'm facing the problem of PHP Safe mode barfing at the UID mismatch of PHP scripts uploaded by user's FTP UID, and later executed by Apache UID, where user's PHP scripts thusly uploaded attempt to

[PHP] RE:Windows Service Call from linux php server

2008-05-15 Thread admin
I used soap to perfect the Windows service call and resolved the issue so simple it kills me. Not happy with the huge upgrade of php process but happy with final results. Resolution: ?php $wsdl= http://user:[EMAIL PROTECTED]/WebService/service.asmx?WSDL; $soap = new soapclient($wsdl,wsdl);

RE: [PHP] My open source php CMS

2008-05-15 Thread admin
Page Not Found. Hello, first of all, sorry for this plug, I am looking for interested developers. I just want to let you know about my open source project that uses over 15 pear classes and uses pear installer as the primary means to install it I also wrote a web-based interface for

[PHP] php mysql live feed

2008-05-20 Thread admin
Okay before i pull more hair out... I am trying to use php to pull mysql data and refresh the mysql data every say 5 seconds for like a live display of the database without the screen reloading. I want the data to refresh but not the screen. Ajax seems to hate me because everything i have

RE: [PHP] php mysql live feed

2008-05-21 Thread admin
Todd I want to thank you. You sent me thinking in the right direction to resolving this issue. I now have successfully created a live Pika Card status GUI using PHP, MYSQL, AJAX. The key word in what you said was unique function. I was not thinking to write a function. I was looking for the

RE: [PHP] RE: Military Service WAS [PHP] Capitalization of variable

2008-06-20 Thread admin
Marine Corps.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Merge array i think

2008-08-14 Thread admin
Here is my problem in mssql in asp i can SELECT (height + 'x' + width) as size FROM Twenty How can i do that for mysql under php? I am trying to create a single array result using 2 different fields of data plus extra characters. -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Merge array i think

2008-08-14 Thread admin
Never mind I was looking at php and it was a Mysql thing SELECT CONCAT('My', 'S', 'QL'); will do exactly what i want Here is my problem in mssql in asp i can SELECT (height + 'x' + width) as size FROM Twenty How can i do that for mysql under php? I am trying to create a single array

[PHP] Altering the error_reporting

2008-09-03 Thread admin
I am looking for a way to alter the error_reporting(E_All) This displays Parse error: parse error, unexpected '}' in /var/www/html/test.php on line 7 I want to remove the file location and line number from the error to only produce Parse error: parse error, unexpected '}' Why? You may ask. I

Re: [PHP] Sepating MySQL result set into html tables

2008-09-26 Thread admin
Might I suggest you count the fields and divide it by the cols you want to display? Example: $forest = mysql_query(SELECT * FROM your_table); $gump = mysql_num_fields($forest); Because I know my table contains 15 rows I can do this. $tulip = floor($gump /5); I know how many fields to display

RE: [PHP] Sepating MySQL result set into html tables

2008-09-26 Thread admin
Might I suggest you count the fields and divide it by the cols you want to display? Example $forest = mysql_query(SELECT * FROM your_table); $gump = mysql_num_fields($forest); Because I know my table contains 15 rows I can do this. $tulip = floor($gump /5); I know how many fields to display

[PHP] Csv issue

2008-10-13 Thread admin
I am using a form to select a csv file and then import it into mysql and maybe im just drawling a blank here. But why is it blowing up. This thing loads like 14 million records into the database and I am clue less how it can do that with a 2 record csv file. form enctype='multipart/form-data'

[PHP] Date Issue

2008-11-17 Thread admin
$smont = 10; $sday = 13; $syear = 2008; $timestamp = mktime(0,0,0,$smont,$sday,$syear); $thismonth = getdate($timestamp); Here is where the problem comes into play. echo $thismonth['yday']; This displays 286 when in fact its 287. Is there a problem in my ini file or what is the deal. -- PHP

[PHP] Php mysql update

2008-12-29 Thread admin
Okay maybe i have just forgot. I am trying to update the database and do a +1 to a int field without pulling the data and adding 1 to it and sticking it back in. Someone refresh me on this please. I think it is something like. $dwsl = mysql_query(UPDATE database set Field='+1' WHERE

RE: [PHP] Php mysql update

2008-12-29 Thread admin
Sorry about that it hit me right after i sent the email. Thank You so much for you reply Hello, you have to do : $dwsl = mysql_query('UPDATE database SET Field=Field+1 WHERE Criteria=\'Criteria\''); From: ad...@buskirkgraphics.com To: php-general@lists.php.net Date: Mon, 29 Dec 2008 12:05:37

[PHP] php rpm

2009-02-04 Thread admin
Okay here is my question. Does anyone know of an RPM of php that is pre-compiled with all the extras like soap, mssql, freetds, etc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] making a tutorial

2006-03-16 Thread admin
Parse.. It will be an array after you submit the form. So depends on what you wanna do with it. Do a print_r($favourite); after form submit and you will see. How to store it.. well if you wanna it in seperate fields you can loop through it and do an insert on every array element in your DB or

Re: [PHP] Query for two fields with the same name

2006-04-20 Thread admin
Maybe something like this : $connection = SELECT t2.id AS idtwo, t1.id AS idone FROM connection AS t1, pr AS t2 WHERE t1.area_id = '$gateway_link' AND t1.pr_id = t2.id; This is probably a simple question, but I can't seem to find the answer online. I'm using this query: $connection =

Re: [PHP] Need help with an if statement

2006-04-24 Thread admin
Kinda depends on how you build the list of links i guess. What you need is a unique identifier. But would be more easy if you show some code. item 1 cart.php?item=1 item 2 cart.php?item=2 Then when you make the links. Use a loop foreach($links as $link) { if ($link[id] == $_GET[item]) {

[PHP] Location header - slow redirect

2003-07-30 Thread admin
I'm using the following short script to redirect users to another page on my site (php 4.3.2, Apache 2.0.47). ?php $goLang='en'; header(Location: http://; . $_SERVER['HTTP_HOST'] . / . $goLang . /); exit; ? I'm having a problem where it takes up to 15 seconds for the redirect page to load, but

[PHP] fopen errors

2004-02-18 Thread admin
I have a PHP front end with a MySQL back end with a longblob field. I am thinking the problem exists in the PHP part. Here is the code I am using: $fileHandle = fopen($fileUpload, r); $fileContent = fread($fileHandle, $fileUpload_size); $fileContent = addslashes($fileContent); Then it goes

RE: [PHP] verify text in field

2009-02-26 Thread admin
Try $text = Joe of Egypt; $sql = SELECT title FROM book WHERE title LIKE '$text'; $result = mysql_query($sql); If(mysql_num_rows($result) = '1') { while ( $row = mysql_fetch_array($sql) ) { echo(P . $row[title] . /P); } } My Ideas my not make some people happy with my design but I use it

[PHP] Time difference desired load

2009-04-20 Thread admin
Suggestion on faster solutions for extremely large database. $ledip['started'] = '2009-04-01 13:40:34'; Example time in DB $ledip['touchedlast'] = '2009-04-01 13:41:28'; Example time in DB date('i:s', strtotime($ledip['touchedlast']) - strtotime($ledip['started'])); // Not a desired solution

[PHP] php/mysql Query Question.

2009-09-15 Thread admin
Before most of you go on a rampage of how to please read below... As most of you already know when using MySQL from the shell you can write your queries in html format in an out file. Example: shellmysql -uyourmom -plovesme --html This now will return all results in an html format from all

Re: [PHP] php/mysql Query Question.

2009-09-16 Thread admin
I tend to do this robert, while looking at your example i thought to myself since i am trying to mimick a shell command why not run one. Result: ? $db = 'db'; $host = 'host'; $user = 'user'; $pass = 'pass'; $query = select * from $db.my_table; $ddvery = shell_exec(mysql -u$user -p$pass --html

RE: [PHP] Fiscal Years and Quarters

2010-10-19 Thread admin
Don If you are looking for current quarter you can do this. $tm = date('Y-m-d H:i:s'); $Current_Fiscal_Quarter = ceil(date(m, $tm)/3); This will return the quarter you are currently in. Exmaple 1, 2, 3,or 4 I have a great quarterly dates function posted on php.net

RE: [PHP] Fiscal Years and Quarters

2010-10-19 Thread admin
Is there any way to get rid of, whatever wet behind the ears person whom has this spam return for every post. mytr...@mail.ua I get 3 and 4 of these for every reply, I am sure anyone who is posting to the list gets the same emails. -Original Message- From: Don Wieland

RE: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread admin
one email when the checkbox is checked and a different email when it's not checked. I'm wanting to send an email to the site admin with the information given by the person who filled out the form that contains the checkbox. Thanks, Ben -- PHP General Mailing List (http://www.php.net

RE: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread admin
I tested your code and besides adding a form to the beginning it works. If you want to see the results of the posted for try. print_r($_POST); you can see every position of the array passed and validate they are passing as intended. Try this. //if reallife is not set (Checked it will not

RE: [PHP] questions about if statements regarding a checkbox

2010-10-31 Thread admin
I placed an example of your code on my site. I simply pasted exactly what you had, minus the actual mailing portion. If you check the box you will see the array, if you do not check the box no array. http://www.richardbuskirk.com/blunk.php Forgive my prior post, I had not woke up yet. So the

RE: [PHP] Problem with shell_exec

2010-10-31 Thread admin
It seems most probably a permission problem. If I were you I would check the permissions on the bin directory and the files in it. PHP will probably run under the uid of the webserver, which, on most systems is either apache or nobody depending on the configuration. Richard L. Buskirk

RE: [PHP] Problem with shell_exec

2010-10-31 Thread admin
After going over this a thousand times in my head and on sever. Here are a few reasons why a shell_exec will not function. First I tested the PHP CLI Can I see my version of php. $output = shell_exec('php -v'); Echo $output; If I am not getting the information about the php version. Is shell_exec

RE: [PHP] How to code in PHP an onchange event in a select?

2010-11-04 Thread admin
OnChange is Javascript. I might suggest you get yourself familiar with JQuery. JQuery makes your life a lot easier when there is a need for client browser interaction with site scripting. Richard L. Buskirk From: Tomás Corrales Lemoine [mailto:to...@hog.ecasa.avianet.cu]

  1   2   3   >