Hi All,
I'm new to PHP - I'm trying to figure out what is wrong with a simple IF
ELSE block I have...if the recordset $rs is empty (login fails), the 1st
part of the block works, and redirects the user to default.php - but if
the login works, and $rs is not empty, the 2nd "else" part does not
work
L PROTECTED] On Behalf
Of Richard Heyes
Sent: Thursday, December 04, 2008 3:17 PM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Help with IF ELSE
> I'm new to PHP - I'm trying to figure out what is wrong with a simple
IF
> ELSE block I have...if the recordset $rs
't work if the recordset isn't empty.
I'm wondering, is there any other way to do a redirect in PHP?
Thanks
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Richard Heyes
Sent: Thursday, December 04, 2008 3:17 PM
To: David Stoltz
Cc: php-g
before special
characters in a string.
http://php.net/manual/en/function.addslashes.php
SanTa
- Original Message -
From: "David Stoltz" <[EMAIL PROTECTED]>
To:
Sent: Friday, December 05, 2008 1:19 PM
Subject: RE: [PHP] Help with IF ELSE
> The problem turned out to
Folks,
Can't seem to connect with MSSQL_CONNECT. The function IS available. I'm
in a Windows environment, connecting to a SQL 2000 instance. My code:
mssql_connect('INTRA_SQL,1433', 'uname', 'password');
mssql_select_db('database');
I've tried leaving the port out, tried using server IP address,
on problem.
Still stuck..
From: Dan Shirah [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2008 9:46 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
Can't seem to connect with MSSQL_CONNECT. The function IS available. I'm
in a
ql_bind" so I can do
parameterized queries
Do you have any other thoughts?
Thanks!
From: Bastien Koert [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2008 10:02 AM
To: Dan Shirah
Cc: David Stoltz; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
On Mon,
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Brown
Sent: Tuesday, December 09, 2008 3:49 PM
To: David Stoltz
Cc: Bastien Koert; Dan Shirah; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
On Tue, Dec 9, 2008 at 3:41 PM, David
From: Dan Shirah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2008 8:10 AM
To: David Stoltz
Cc: Daniel Brown; Bastien Koert; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
Sorry for "top posting", that's how my email client se
-Original Message-
From: Dan Shirah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2008 8:46 AM
To: David Stoltz
Cc: Daniel Brown; Bastien Koert; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
>
> Try something like this:
>
>
>
>
From: Dan Shirah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2008 9:42 AM
To: David Stoltz
Cc: Daniel Brown; Bastien Koert; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem
Is INTRA_SQL your instance name or database name? If it is the
instance
It's fixed WOO HOO - I'm going to get teary-eyedDan - special
thanks to you for helping me so much...
What fixed this? I put the DLL for SQL 2005 PHP Driver in the PHP/EXT
directory, and added the extension to the php.ini.
Restarted IIS, and BAM! Everything works
The only thing I did
I can't seem to understand PHP error trapping...I have it turned on in
php.ini, and on the page in question, I have "error_reporting(E_ALL);"
on the page in question below - the following code does NOT generate any
errors, but it doesn't perform the insert eitherthe stored procedure
exists, but
chard [mailto:jblanch...@pocket.com]
Sent: Friday, April 17, 2009 12:17 PM
To: David Stoltz; php-general@lists.php.net
Subject: RE: [PHP] What am I doing wrong?
[snip]
I can't seem to understand PHP error trapping...I have it turned on in
php.ini, and on the page in question, I have "error_report
If I allow multiple selections in a MENU LIST, in VBSCRIPT it comes
through with each selection being separated by a comma, in the same
variable...ie.:
myVal = request("mySelectmenu")
myVal could equal -> "selection 1, selection 2, selection 3"
But in PHP, I capture it as:
$mySelectMenu = $_POS
Hi Folks,
I'm a PHP newbie - but this question really isn't about PHP per se',
it's more about programming in general, and how to do something...
I'm redesigning an ASP site with Dreamweaver CS4, so I'll be sticking to
using ASP technology
The site will use horizontal navigation for the MAIN
Folks,
I'm developing a rather large site in PHP. The main horizontal nav bar
never changes, no matter how deep you are in the site. However, on the
left side is a vertical "sub-menu" system. This menu is proving to be a
real pain to program. I have it limited the menu system to 3 levels:
MAIN:
Code in question:
mssql_bind($stmt,
'@managerName',$managerName,SQLVARCHAR,false,false,50);
For a normal varchar field, the length is obvious, in this case 50.
But for an ntext field, how do I use the mssql_bind statement?
Far as I know, these are the only available "types" to use:
SQLTEXT, SQLV
$rs->Fields(22) equals a NULL in the database
My Code:
if(empty($rs->Fields(22))){
$q4 = "";
}else{
$q4 = $rs->Fields(22);
}
Produces this error:
Fatal error: Can't use method return value in write context in
D:\Inetpub\wwwroot\evaluations\lookup2.php on line 32
Line 32 is the "
.@gmail.com]
Sent: Tuesday, August 25, 2009 2:17 PM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to output a NULL field?
On Tue, Aug 25, 2009 at 2:00 PM, David Stoltz wrote:
> $rs->Fields(22) equals a NULL in the database
>
> My Code:
>
> if(empty($
-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Tuesday, August 25, 2009 4:39 PM
To: php-general@lists.php.net
Subject: Re: [PHP] How to output a NULL field?
On Tue, Aug 25, 2009 at 02:00:04PM -0400, David Stoltz wrote:
> $rs->Fields(22) equals a NULL in the database
>
> My C
I tried that -it's in the first part of my message
-Original Message-
From: hack988 hack988 [mailto:hack...@dev.htwap.com]
Sent: Wednesday, August 26, 2009 7:39 AM
To: David Stoltz
Cc: Paul M Foster; php-general@lists.php.net
Subject: Re: [PHP] How to output a NULL field?
use is
This:
$var = $rs->Fields(22);
var_dump($var);
Produces this:
object(variant)#3 (0) { }
-Original Message-
From: Stuart [mailto:stut...@gmail.com]
Sent: Wednesday, August 26, 2009 8:47 AM
To: David Stoltz
Cc: Paul M Foster; php-general@lists.php.net
Subject: Re: [PHP] How to outpu
>Fields(22); //this is where that particular field is NULL, and
produces the error
-Original Message-
From: hack988 hack988 [mailto:hack...@dev.htwap.com]
Sent: Wednesday, August 26, 2009 8:08 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to outpu
riginal Message-
From: hack988 hack988 [mailto:hack...@dev.htwap.com]
Sent: Wednesday, August 26, 2009 10:13 AM
To: a...@ashleysheridan.co.uk
Cc: David Stoltz; php-general@lists.php.net
Subject: Re: [PHP] How to output a NULL field?
My code for mssql
please enable the php's mssql extentions.
t',$alt,SQLVARCHAR,false,false,150);
mssql_bind($stmt, '@desc',$desc,SQLVARCHAR,false,false,100);
// Execute
mssql_execute($stmt);
-Original Message-
From: hack988 hack988 [mailto:hack...@dev.htwap.com]
Sent: Wednesday, August 26, 2009 12:18 PM
To: Andrew Ballard
Cc: David Stol
Looking on Amazon and other book sites, I can't even find a book for
"PHP and MS SQL"...
It's all "PHP and MySQL"...
Should I avoid developing PHP application with MS SQL databases?
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Wednesday, August 26, 2009
You're a genius - that works!
-Original Message-
From: Bastien Koert [mailto:phps...@gmail.com]
Sent: Wednesday, August 26, 2009 2:02 PM
To: Andrew Ballard
Cc: Shawn McKenzie; php-general@lists.php.net; David Stoltz
Subject: Re: [PHP] Re: How to output a NULL field?
One o
I have:
$goalString = "Goals Entered By ".$mymanager."On
".$when.":".$mygoal."";
Which outputs in this tag:
But if there are double or single quotes in any of the $goalString, it
messes up the output.
I know this is a simple fix, but I'm not sure how to fix it since I'm
new to PHP...
I'
How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying, unsuccessfully:
$nextdate = "8/2/2009";
if(strtotime($nextdate)<=getdate()){
echo "Sorry, your next evaluation date cannot be in the past,
Click BACK to continue.";
exit;
om: Stuart [mailto:stut...@gmail.com]
Sent: Friday, August 28, 2009 10:19 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date Comparison
2009/8/28 David Stoltz :
> How to I ensure a variable date is not in the past, compared to the
> current date? Here's how I
I'm really struggling with dates in PHP. (Yes, I tried reading the
manual)...
Can someone provide code that does this:
Takes current date, assigns it to a variable (let's say $today)
Then adds 30 days to $today variable
Takes a string ($nexteval) like '8/26/2009' and compare it to $today.
The va
date));
if($d1>$d2){
echo "Sorry, your next evaluation date must be at least 30 days
away, Click BACK to continue.";
exit;
}
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Tuesday, September 01, 2009 12:43 PM
To: Da
Hi,
We are currently using PHP version 5.2.6. in production, and I'd like to
upgrade to the latest 5.3.1
My Assumptions:
- I can simply download the Windows binary file, and install it.
- None of the 5.2.6 code will break
Will there be a momentary interruption of web services during the
install?
Forgot to ask:
On the Windows download page, there are options like:
VC9 Thread Safe
VC9 Non-Thread Safe
VC6 Thread Safe
...etc
What is the VC, and what is thread safe?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Bob - I checked the changelog - 99% of it are bug fixes
I don't see anything about 5.2.x features not being available as you
suggest.
But thanks for the reply.
-Original Message-
From: Bob McConnell [mailto:r...@cbord.com]
Sent: Friday, November 20, 2009 10:50 AM
To: David S
You can use either cookies of sessions to maintain security:
Some pseudo code:
Login page:
Login successful? If yes, set session value "LOGIN" = "YES"
Then on all other pages, 1st check session value "LOGIN"if != "YES"
then bump them to the login page.
Make sense?
-Original Message---
Folks,
I upgraded from PHP 5.2.6 to 5.3.1 on my test machine. Pretty easy, just
installed FastCGI for IIS6, installed PHP 5.3.1 and entered the .php ext
stuff into IIS6.
Now I tried it on my production box. No go. Although the web extension
"FastCGI Handler" can be enabled with no problems, PHP d
Hi all,
I'm installing 5.3.1 on my Windows Server with IIS6.
Should I choose VC9 x86 Thread Safe or "non-thread safe" ?
What is the difference?
Thanks!
Hi All,
I have a working application in PHP 5.3 under IIS6. I've created a WAMP server
(Windows, Apache, MySQL, PHP) on a dedicated server, and I'm trying to move the
application to the new, dedicated server.
My first problem, the new server doesn't like this line of code in the
default.php:
Even if I comment out what's in the include file, it still errors.
It's the actual "include" statement causing the error, not what's in it
-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Monday, March 01, 2010 1:33 PM
To: Dav
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,"")
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),"\n",$value)
Neither does:
$var = str_replace(chr(10),"\n",$value)
What am I doing wrong?
Thanks!
Hi folks,
This isn't really a PHP question per se, but could apply to any
language...
I have a public facing web server, which we have a software component
that helps protect us from SQL Injection, and the like.
We recently have added a very small web application that is vendor
supporte
allow_url_include is (or should be) disabled by default.
http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-
include
I can't think of one good reason to ever enable this, it would be a
security issue no matter how you slice it...
-Original Message-
From: Igor Escobar
PHP newbie here...
I have some PHP code writing the date/time into a MS SQL 2000 database
like this:
date('l jS \of F Y h:i:s A')
So the text it writes into the DB is like: Thursday 15th of April 2010
10:13:42 AM
The database field is defined as varchar, not datetime...so it's a
str
I would agree with you, but I have no control on inherited web apps.
I now need to concentrate on trying to fix this.
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thursday, June 17, 2010 8:38 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date
people's stuff...not to mention I'm a
newbie, so that doesn't help ;-)
Thanks!
-Original Message-
From: Richard Quadling [mailto:rquadl...@gmail.com]
Sent: Thursday, June 17, 2010 8:47 AM
To: David Stoltz
Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net
Subject: Re
47 AM
To: David Stoltz
Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net
Subject: Re: [PHP] Date Conversion Problem
On 17 June 2010 13:40, David Stoltz wrote:
> I would agree with you, but I have no control on inherited web apps.
>
>
>
> I now need to concentrate o
oldDate = replace(oldDate,"August ","8/")
oldDate = replace(oldDate,"September ","9/")
oldDate = replace(oldDate,"October ","10/")
oldDate = replace(oldDate,"November ",&qu
Folks,
I'm trying to validate an email address which is entered in a form field
against our Active Directory.
I'm using some PHP scripting supplied by http://phpad.sunyday.net/ but
it's not working, and the site doesn't seem to be supported anymore.
Does anyone have any "good" method of
Awesome – thanks – BTW, what does “it’s the chronic” mean?
From: Nathan Nobbe [mailto:quickshif...@gmail.com]
Sent: Monday, June 21, 2010 11:27 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP & Active Directory?
On Mon, Jun 21, 2010 at 8:59 AM, David St
Lol – ok…I guess it’s comparable to “it’s the bomb”….
Thanks ;-)
From: Nathan Nobbe [mailto:quickshif...@gmail.com]
Sent: Monday, June 21, 2010 11:46 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP & Active Directory?
On Mon, Jun 21, 2010 at 9:42 AM, D
Hi Folks,
Upon occasion, I have the need to hit our MS MSL database from our
PHP/mySQL server. So I've created a function, but I'm not sure if you
can return a recordset from a function. My code is below...
In the calling page I code:
Fields(1);
?>
The mssql.php include file is:
open
ichard Quadling [mailto:rquadl...@gmail.com]
Sent: Friday, June 25, 2010 9:59 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Returning a Recordset from a Funtion
On 25 June 2010 14:55, David Stoltz wrote:
>
> include('../includes/mssql.php');
>
>
eft to connect to MS MSQL for me, so it's not
used too often - we're now developing with mySQL.
Thanks for the info.
-Original Message-
From: Andrew Ballard [mailto:aball...@gmail.com]
Sent: Friday, June 25, 2010 10:38 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: R
Here's my code (using MSSQL):
$conn = new COM ("ADODB.Connection")or die("Cannot start ADO");
$conn->open($connStr);
$query = "SELECT * FROM TABLE WHERE id = ".$id;
$rs = $conn->execute($query);
This code works fine, and I retrieve the values like this:
$tmp1 = $rs->fields("column1");
$tmp2 = $
Matijn - it worked! Geez...
Strange - I don't need the ->value if it actually has a value, only if it's
NULL...
But it works! Thanks!
-Original Message-
From: Matijn Woudt [mailto:tijn...@gmail.com]
Sent: Tuesday, April 24, 2012 1:40 PM
To: David Stoltz
Cc: php-general@
To: Matijn Woudt
Cc: David Stoltz; php-general@lists.php.net
Subject: Re: [PHP] NULL Problem
Have you considered the PHP MSSQL driver?
http://www.microsoft.com/download/en/details.aspx?id=20098
Kind regards/met vriendelijke groet,
Serge Fonville
http://www.sergefonville.nl
Convince Google!!
Th
Folks,
Having a difficult time using mssql_bind with characters greater than
8000...the database field is set to ntext, and I've also tried
varchar(max), both seem to produce the same results:
If I use:
mssql_bind($stmt, '@mgrnotes',$mgrnotes,SQLVARCHAR,false,false,8000);
I get the error:
Warnin
59 matches
Mail list logo