[PHP] Re: Ive lost a zero somewhere

2003-11-06 Thread Lang Sharpe
You could use number_format.. $f = 25.50 * 3 $s = number_format($f,2,'.',NULL); Lang Richard Cook wrote: > I have a problem with the following > > when i multiply for example 25 . 50 * 3 i get 76 . 5 how would i get PHP > to recognise the last 0 ie make it 76 . 50 > > Any ideas? > > > Reg

[PHP] Re: Input Validation of $_SESSION values

2003-11-05 Thread Lang Sharpe
As long as you... 1. Have register_globals set to off in your php.ini and 2. Check the values before you put them in the session. You should be ok. ie. if you just go $_SESSION['g_id'] = $_GET['g_id'] on one page, then you still have the same security risks as using just $_GET. If you are slight

[PHP] Re: [PHP-DB] $_POST in MySQL query issue...

2003-10-21 Thread Lang Sharpe
The reason curly braces are needed are because you are putting an array element into a string. Consider.. $sBlah = 'blah'; echo "$sBlahfoo$sBlahfoo"; PHP will attempt to echo the variable $sBlahfoo twice. if you use echo "{$sBlah}foo{$sBlah}foo"; you have told php explicitly when to look for

[PHP] Re: $_POST in MySQL query issue...

2003-10-16 Thread Lang Sharpe
> $sql="insert into $table set Name = '$_POST["elementName"]'"; The problem with this is that you need to use curly braces around the variable being substituted in the string. Also use single quotes around the array index. $sql="insert into $table set Name = '{$_POST['elementName']}'"; See the

[PHP] Re: PHP crashing with using Oracle

2003-07-06 Thread Lang Sharpe
I had to change ext/oci8/config.m4 Remove the line highlighted in red on this page. http://cvs.php.net/diff.php/php-src/ext/oci8/config.m4?login=2&r1=1.37.2.6&r2=1.37.2.7&ty=h The line is AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) Then do configure/make/make install again. That will get the oci8 su

[PHP] Re: Problem with PHP and Oracle

2003-07-02 Thread Lang Sharpe
Hi Anup I had to change ext/oci8/config.m4 Remove the line highlighted in red on this page. http://cvs.php.net/diff.php/php-src/ext/oci8/config.m4?login=2&r1=1.37.2.6&r2=1.37.2.7&ty=h Then do configure/make/make install again. Lang -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] 4 hours staring - can't see clear.

2003-06-12 Thread Lang Sharpe
You can't embed function calls in strings like this $sString = "{addslashes($blah)},{addslashes($blah)}"; you have to go $sString = addslashes($blah) . ',' . addslashes($blah); Lang John Taylor-Johnston wrote: > Lars, > > Thanks. I am getting this error however: > > Parse error: parse error,

Re: [PHP] Re: Biding Arrays from Oracle Stored Procedure to PHP Variables

2003-05-30 Thread Lang Sharpe
done before fetch or > execute and fetch in C:\ftp_dir\boards\winners.php on line 21 > > All the variables are there; is there any way to get more detail on > which variable or variables is causing problems? > > Thanks again > > Greg > > > Lang Sharpe wrote:

[PHP] Re: Biding Arrays from Oracle Stored Procedure to PHP Variables

2003-05-29 Thread Lang Sharpe
Have a look at this paper, in particular the collections section at the end http://www.phpconference.de/2001/slides/arntzen_ocipaper.txt I've never used them myself, because they look a bit dodgy. But it may be the only way to do what you're trying to do. Lang Gregory Watson wrote: > Hi guys.

[PHP] Re: Advanced Form Processing HELP

2001-08-22 Thread Lang Sharpe
Can't be done AFAIK. Because your webserver never receives the information when the page is reloaded, you can't send it back to him when he reloads. Lang Sharpe Arcadius A. wrote: > Hello ! > I have a simple form ("feedback.php") that could allow users to send me