Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Strtotime Failure


I don't know how I should input date + time into a strtotime function (i'm a total noob) so I tested this:

<?
$d=01;
$M=01;
$y=1970;
$h=01;
$m=01;
$s=01;
echo "$d $M $y $h:$m:$s";
echo strtotime("$d $M $y $h:$m:$s");
?>

I get as echo strtotime '-1', wich means the strtotime has a failure. Can anybody explain me why? Or can anybody tell me how I can make a strtotime function that puts a timestamp in the database depending on the date and time inserted in a textbox? (one textbox or one textbox to insert the day, another to insert the year,...) I should be able to change a format like (for example) this : 01-02-1990 00:00:00 (midnight) into a timestamp. so dd-mm-yyyy hh:mm:ss (or something else just to make it work)I'm clueless.




View Complete Forum Thread with Replies

Related Forum Messages:
XML Includes In PHP Causes Failure.
First off, I'm posting this question for a friend that doesn't have
access to the news groups.

Problem:
Using PHP as the base and has several PHP < includes > for various
functions, all this by its self works just fine.

Failure occurs on adding the XML include.

Here's the wierd: If all the PHP includes are removed/commented out,
the XML includes work fine. As soon as you replace/uncomment the PHP
includes everything fails.

View Replies !
Odbc_exec Failure
I want to execte some query using odbc_exec, but i receive the
following error both using odbc_exec or odbc_prepare. Connection is
successful but the other functions will fail. PHP Version 4.3.11 with
Microsoft-IIS/5.0.


Warning: odbc_exec(): SQL error: [TCX][MyODBC]Using static cursors
instead of requested type, SQL state 01S02 in SQLSetStmtOption in
c:inetpubwwwrootsubetrafikconnect.php on line 8

Warning: odbc_prepare(): SQL error: [TCX][MyODBC]Using static cursors
instead of requested type, SQL state 01S02 in SQLSetStmtOption in
......

Any help will be appreciated...

View Replies !
Session_destroy Failure
What would cause me to get this message: "Session object destruction failed..."

Here's the code I'm using:

session_name("Client_Area");
session_start();
session_destroy();

View Replies !
File_get_contents Failure
This may be a very easy question, and I may need to supply more
information, but basically trying to read a file at a URL with
file_get_contents() returns the error message:

[function.file-get-contents]: failed to open stream: HTTP request
failed! HTTP/1.0 403 Forbidden

View Replies !
PHP-SQL Connection Failure.
I had PHP installed on as CGI on a Window 2000 Server and connected to
an MSSQL 2000 on another server. Both server were upgraded to Windows
Server 2003 and problems developed that I could no longer run PHP any
more.

What I did next was to uninstall PHP and re-installed it as ISAPI, and
make necessary configurations in Windows Server 2003. PHP seems to
work fine now on my applications are having problem connection to
MSSQL. One thing to note here is that I am using the old php.ini as it
has been adapted to the application.

The problem has to do with connection failure as shown below:

Warning: mssql_pconnect(): Unable to connect to server: ServerName in
c:InetpubwwwrootApplicationDiradodbdriversad odb-mssql.inc.php on
line 327

Warning: error_log(c:/Application_temp/errors.log): failed to open
stream: Permission denied in
c:InetpubwwwrootApplicationDiradodbadodb-errorhandler.inc.php on
line 68

Fatal error: mssql error: [: Connection error to server
'ServerName,SQLUserName,PWD,Database' with user ''] in
PCONNECT(ServerName,SQLUserName,PWD,Database, '****', '****', ) in
c:InetpubwwwrootApplicationDiradodbadodb-errorhandler.inc.php on
line 75

Is there any changes I need to make in php.ini regarding ISAPI
installation.
I am working with PHP4

View Replies !
Reopening Url On Failure
I was trying to code a script whereby I use fscokopen to load a webpage
into a string, then parse the code.

However, because of occasional timeouts and failures, I was trying to
add a method to attempt to try and reload the URL, say five times,
before it gives up and moves on.

I was playing around with 'do-while' strings, but can't seem to think
my way round this one.

View Replies !
Php Session Failure
In a php session I have set up a user can input several hundred values
on a form.

I then show the user what he or she has entered on a preview page
which he or she can then click ok or cancel.

On clicking cancel the user should be backed using this code

<td>
<div align="center">
<input type="Submit" value = "Continue">
&nbsp;
<input type="button" value="Cancel" onClick="history.back()">
</div>
</td>

I have used this before at it worked. However it now returns the user
to the previous page (form entry), but now all the values are empty.
Annoying if the user just made one simple mistake in the several
hundred entries they wanted to correct.

Any ideas what I am doing wrong?

Any other tricks to acheive this?

View Replies !
UNION ALL Failure
I'm trying to use UNION ALL to match three SELECT queries. Each query has 8 column names but for some reason it fails when I use a particular group of column names. Namely the 7th column names in the queries below (ad_credit_amount in the first two SELECT queries and transaction_amount in the third SELECT query). In mysql these both of these columns are set as VARCHAR(200) and utf-8 unicode. They contain numbers that include decimal places. This is really confusing me because the other columns are working fine with similar data.

$sql = "select * from

(
(

(
SELECT ad_timestamp,ad_number,ad_location,ad_category_number,ad_title,
ad_fee_amount, ad_credit_amount, ad_account_ballance
FROM ads_live WHERE
(.......

View Replies !
Htaccess Failure
this looks weird. i'm trying for apache to parse php code in .html file; my .htaccess looks as follows:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

Only these 2 lines of code. I have placed this .htaccess in the Sites folder (OS X). elow is the test.html which is also in the Sites folder.

<?php
echo "text";
?>

The error is my browser isn't displaying anything. Do you guys know where have I done wrong? I have chomed the .htaccess to 644. Do I need to tweak the httpd.config?

View Replies !
Database Failure
Is there a way to tell PHP, "Spend 5 seconds trying to reach the database, if you can't reach it, then load the file from the cached flat file.". I suspect the answer is no. I'm tempted to rewrite all my code in Java, just so I can have threads. And private methods. And private class properties. And real encapsulation. And interfaces. And abstract classes. And the ability to do anything.

View Replies !
Failure To Include
There are several php files my php code includes on a website using the include(function). all work except for one and this to me is the weirdest problem i've had so far in my php ciding experience. i tried renaming the file name of the include, tried rewriting the code in the files that does the inclusion. whatever i try it just does not work. if i include any other existing file IT WORKS. this one does not. here is the complete error:

Warning: include(admin__global.php) [function.include]: failed to open stream: Invalid argument in [....]/admin_user_login.php on line 9

Warning: include() [function.include]: Failed opening 'admin__global.php' for inclusion (include_path='.:') in [....]/admin_user_login.php on line 9.

View Replies !
Compiling/Installing PHP 5 Failure
I am trying to install PHP 5.0.4 on my Solaris 8 server.
I have already installed mysql 4.1.11 and Apache 2.0.54. Both appear to

work fine..

I'm running the ./configure with the following options:
../configure --with-apxs2=/opt/csw/apache2/bin/apxs --with-
mysql=/usr/local/mysql --with-zlib-dir=/opt/csw/lib

The script terminates with the the following error (from the
config.log)

-----------------
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(client.o):
wrong
ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_error /var/tmp/ccmSQSM2.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 56843 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();
-----------------

View Replies !
Require_once('DB.php') Failure
I'm using a relatively simple php script to query a mySQL database and
return values formatted to a variable string for interpretation by an
embedded swf. There is one php file that handles the connection to the
db (db_login.php) and one that handles the query (db_getProjects.php).
If I call up the db_getProjects.php file it simply spits back a
"&varibale=value..." blah blah string. The problem is that it works
only half the time...it'll be fine for a while then simply stop working
at all for a while...then start working again. When it isn't working
it is failing to even get past the require_once('DB.php') statement -
anything after that is never reached.

What could I be doing that is causing the require_once('DB.php') to
fail after working flawlessly for stretches?

note: I am making sure to close the connection at the end of each DB
call, so I don't think its due to open DB connections piling up, though
that seems to be the only logical answer.

View Replies !
Image Upload Failure
I have a script that I've been messing with and I am having trouble setting a path for images, I'm getting an upload failed response

on the webserver the path is www/OEM/admin/thumbs the php page is located in the "admin" folder Ive tried both paths, I think I'm messing something up. Code:

View Replies !
Header() Functino Failure
Why is the following error always displayed on my browswer when i use HEADER() function ?

Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwApplicationsGuest_Bookadmin.php:10) in C:wampwwwApplicationsasic.php on line 6

View Replies !
Http Connection Failure
I'm making a php page that syndicates blog links using rss feeds and magpie to parse them. All is well, but there is one feed (my own!) that doesn't work. I always get a "HTTP Error: connection failed (1)" error.

I tried pulling the exact same file from another website and it worked, so the problem is just that one of my sites won't talk to the other one. It's not an anti-social site though, the feed has been syndicated on other sites in the past and works just fine in services like bloglines. Does anyone have any idea why I'm getting this error?

View Replies !
Exif Module Failure
I am absolutly exausted to figure this one out. I require the exif module to work under 5.0.1 but apache (2.0.48) just dies with a 1067 failure, I can't find any usable log info apart from the 1067. Anyone had the same problem?

View Replies !
PHP Install On APACHE A Failure
I've been trying all day to configure PHP with Apache and it's been a nightmare I've tried every suggestion that is out there, including PHP's official manuals, and it's been nothing, but a failure. Code:

View Replies !
Mysql Connect Failure
I have 2 scripts that both start with:

<?php
// Database Connection
include 'connect.php'

One of them is fine, but the other gives the error:

Warning: mysql_connect(): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)

Since the same file is being included both times, I can't see why it should fail in one case. Any ideas anyone?

View Replies !
Failure Of Smtp On Port 25
i have setup smtp on 2003 web edition, IIS. Port 25 is blocked and will not respond to any telnet open commands, so i have opened port 26 which now works fine... IS this any less secure than port 25?

View Replies !
Using Strtotime()
Lets say I have a variable $time = 'Apr 30 2007 7:00AM'. Is there a function that I can use or a way of using the strtotime function to see if that variable $time is between the hours of 7am and 7pm?

View Replies !
Strtotime
I am trying to compare 2 dates, so that if a post is older that 90 days the user is not allowed to edit it.

i am storing the post date in mysql in datetime field (2007-04-21 10:53:07). My question is how to user strtotime function to compare the NOW() date&time with the stored one, so if greater that 90 days return true.

View Replies !
A Bug With Strtotime
Something seems to be wrong with the strtotime function in PHP5. I've created a staff resourcing database, which is used to assign staff to projects on a weekly basis. The database stores assignments against a week ending date, which is derived using: PHP Code:

$week = date('Y-m-d',strtotime('Sunday'))

This works fine, $week is set to the current week ending date (Sunday) using this. However, I also create $nextweek and $lastweek using: PHP Code:

$nextweek = date('Y-m-d',strtotime('next sunday',strtotime($week)));
$lastweek = date('Y-m-d',strtotime('last sunday',strtotime($week)));

This has also been working fine, until we got to week ending Sunday 30th October. For some reason, when $week = 2005-10-30, $nextweek becomes 2005-10-05, which is a Saturday. I've tried replacing the 'next Sunday' with '+7 days', but this returns the same date. Is this a bug? Am I missing something?

View Replies !
Strtotime &
I've got a question and was hoping someone could offer some assistance. I've got this simple line in a test file. PHP Code:

echo date("Y-m-d", strtotime("next Monday"));

Here's my results using different versions of PHP:PHP 4.4.7: 2007-11-04PHP 5.1.2: 2007-11-05PHP 5.2.3: 2007-11-05
Todays date is November 03, 2007 (2007-11-03).

View Replies !
Strtotime()
<?php
$current = date ("F", strtotime("now"));

$next = date("F", strtotime("next month")); //or try "+1 month"

echo $current.'...'.$next;
?>

View Replies !
Imap/pop3 Connection Failure
After searching thru old posts, php.net and other places, I cannot find the problem in this. I am trying use the web-based mail client from the devshed's article-http://www.devshed.com/Server_Side/...ail1/page1.html .
The problem is the connection is not working. My server does not allow IMAP streams so the POP3 version used in this tutorial is a step in the right direction.

Here's the problem line: (or the line that I am having problems w/ anyway)

View Replies !
Mail() Failure To Connect To Mailserver
I have wrote a simple mail script which was working fine - when I moved it to a different server I get the error: -

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:homeproject32sendmessage.php on line 219 code:

View Replies !
PHP Does Not Display Error Messages About The Failure
I have PHP 4.3.7 running on my client's Windows 2003 server. The same
computer also runs SQL Server and I am trying to connect from PHP to a
database. This fails, so I would like to track down the cause for this
failure.

However, PHP does not display error messages about the failure. I have tried
these:

php.ini:
display_errors = On

test.php:
error_reporting(E_ALL);

phpinfo() says error_reporting is set to 2047 (E_ALL).

Yet I still do not get any errors.

Even when I write arglebargle code, PHP still produces a blank HTML-page
instead of syntax error message.

Are there any other settings in addition to the two forementioned which may
affect error reporting?

View Replies !
Echo Long Strings Failure
I have a situation where I am echoing a long string to a client (winsock receive). This string is an extraction from a database. I use a while loop to do this (code below) . Problem is the echo immediately following the last iteration of the while doesn't get seen by the client (sometimes). Code:

View Replies !
Recent Failure Generating PDF Via FPDF
In latter stages of development on a SugarCRM based Home Inspections app (deployed independently on numerous Tablet_XP/WAMP stacks) recent updates have left the system on one of the Tablets failing to Generate our 'contract.pdf' This is a feature that has otherwise been functional for 6 months plus.

The curious thing is that a carbon copy of the app functions beautifully on an 'identical' sister Tablet.

Caveats / Known Subject System Discrepancies:

For two Toshiba tablets purchased, shipped and 'programmed' simultaneously. I am absolutely BLOWN AWAY by the quirky differences between the two.

Subjects Run:

'Carbon Copies' of the Same wamp stack, Customized Sugar CRM app, Table Structure AND Data. (by import)

Tablet A: Generates PDFs.
Tablet B: Does Not.

Tablet A: Arrived from Toshiba loaded with ADOBE Reader 7.0 - (NO recollection of having updated this)

Tablet B: Arrived from Toshiba loaded with Acrobat Reader 5x

In the course of recent and sizable updates to the CRM app, we also upgraded Tablet B: to ADOBE Reader 8 in order to gain Send/Mailto functionality not featured in Acrobat Reader 5x. As yet, I have little reason to suspect that this is the source of the problem, however after copying and pasting the entire wamp/www folder from Tablet A, to Tablet B and finding that PDF generation
continues to fail... My suspicions grow.

Still should ADOBE prove NOT to be the problem... What then? Drop and rebuild the server? DataBase? Data?

As for the Data, it is largely the same (user tables/system settings notwithstanding) synchronized
via SQLyog, however there may well be subtle differences in table structure (indexes... ?), but I don't believe the PDF scripts to be all THAT critically dependant on data from the database.

Seems like -- worst case scenario -- a contract.pdf might get created with empty data fields
(first_name, last_name, billing_address...) but the rest is just html_write from SavePDF.php.

Otherwise, perhaps something to do with Apache?

Ahh... The plot thickens -- as we learn that the Apache server on Tablet A: (the one that works)
throws errors every time it is shut down from wamp admin utility, and the mysql server is comparatively DOG SLOW, WHILE the wamp stack on Tablet B: NEVER throws an error, and is comparatively LIGHTNING FAST

View Replies !
Failure When Uploading Large Files
<form enctype="multipart/form-data" action="./ProcessUpload.php" method="POST">
        Upload this file: <input name="userfile" type="file" />
        <input type="submit" value="Upload File" />
        </form>

That's the code I have for uploading files, it works fine for uploading small files but I'm unable to upload large ones.

I'm trying to upload a 22MB PDF file but even after removing the MAX_FILE_SIZE limit(Which was high enough before) the file information still doesn't make it to the processupload page. I get the error that the variable 'userfile', from $_FILES['userfile']['name'] doesn't exist.

View Replies !
Handling File-read Failure
I'm kinda new with php, but I'm dying to know how to do the following. But can't seem to get the syntax right. Here's the pseudo code:

Page Refresh = 30 secs
--Read file-a.txt
--file-a.txt not available?
----read file-b.txt
----file-b not available?
------do nothing... (page will refresh in 30 secs and repeat the process)

The problem:
=======================

I have a lot of visitors accessing my site and a lot of times the page becomes inaccessible if it refreshes at just the right (wrong) time while it's being read/written to. Instead of the page locking up or giving a server error, I want to be able to try to read a secondary file as a backup.

View Replies !
Login Failure On Secure Website
I have a website that has a secure area to view data and any login does not work anymore.

I had another problem in that I was not able to upload and then view data that is displayed in this area and attempted to clear out all the data thinking  had reached some sort of limit and after clearing out this data the secure login no longer works. My question is where would the username/password be stored for the logins (emailaddr/password form)?

I believe I have managed to get rid of the whole directory structure that the .htpasswd file lived in as I found a link to a location that no longer exists but do remember that the uploads lived in this area too.....DOHHHHH I know but i am a novice and a little bit o knowledge is dangerous. I am still able to SSH in and access email etc so all is not lost but would aprreciate some help in making it semi operational again.

View Replies !
Problem With Strtotime
I am stucked with strtotime to convert date earlier than 1970 into time.
Is there any other way to convert older dates between 1900-1970 into time?

View Replies !
Strtotime 30mins Ago
How can I use strtotime to return the time 30 mins ago, for example:

date("ymd H:i:s",strtotime("-30 minutes"));

View Replies !
StrToTime () Issue
I'm using strtotime to get the timestamp for midnight. I have a statistics
script for my pagecounter that displays hits since midnight.
I also display the number of hours and minutes passed since midnight.

$start = strtotime ('today 00:00');
$timepassed = date ('H:i', time () - $start);

The weird part is at 11.30 AM it says 12 hrs and 30 minutes have passed.
I tried adding GMT+1 like so: $start = strtotime ('today 00:00 GMT+1');
because I suspect the fact I'm in Holland is the reason for the
miscalculation.
But this format is refused by strtotime. (-1)
Does anyone know
a) whether this is indeed the problem, and
b) how to fix it. Preferrably not alone for me here, but in suc a way anyone
around the globe would have a correctly working script if they'd use mine.

The php page for strtotime pointed me to a link at gnu.org where the syntax
for it apparantly is listed, but I get a no such page error.

View Replies !
Strtotime And Cron
I've got a db of events which have dates attached to them which have been created using strtotime().  They don't have any time.. just the date.  I've got a script which gets today's date using strtotime("today").  I use this as a comparison to find events which happen today.  This works fine when I call the script from a URL, however when I called the php file from a cron job... the strtotime("today") creates values which are different each time.

Are there any thoughts on what could be causing this?  Firstly, I was wondering if the cron job was somehow using a different timezone to me (I'm On GMT).  How do I explicitly tell php to use GMT.. .but then again.. this should matter too much, because I jsut want to date not the time!  It also wouldn't account for the changing values of strtotime("today").

Just out of interest, does php4 and php5 handle strtotime("today") differently?  I'm just wondering if cron is using the correct version of php?

View Replies !
Strtotime Question?
I have a string that looks like (a series of them)

1 Sep 2007 21:06:11
2 Sep 2007 13:45:31
2 Sep 2007 13:45:31
3 Sep 2007 01:40:42

and I want to go strto time on it any ideas its return -1 right now so I know somethings wrong.

View Replies !
Date Strtotime
i am trying to right a date into the mysql database but when i get the date from the html form and do strtotime on it it goes to an invalid date (by this i mean it is not the date i entered in the html form so for example 22-06-2007 changes to 28-11-2027).

View Replies !
Remove 0 From Strtotime?
Like every other blog in the world, I have mine displaying the date and time of each entry. Right now this is what I'm using:

echo date('h:ia', strtotime($r[date]));

My latest entry's time is displayed as 07:56pm. How do I remove the 0 when the hour is a single digit?

View Replies !
Strtotime(date('m/d/Y'))
does the following code give the correct time:?strtotime(date('m/d/Y')) or do I need to use : strtotime(date('d/m/Y'))?

I tried to find out which way the month and day work, but can't seem to find anything that will tell me.

View Replies !
Strtotime() Pre-1970
if I code

$birth = strtotime(&#391; April 1950');

then $birth = -1, I guess that this is because time "began" on 1st Jan, 1970. (although I seem to remember a few good times before that). So, what's the easiest way to find out how many days old I am (exactly, please, not just taking 1 April 1970 and adding 20 *365, which does not account for leap years?

View Replies !
Strtotime With Days
On this - "next Thursday" is that next thursday or the next thursday ie: on wed will it show tomorrows time or the next week? PHP Code:

<?php
echo strtotime("now");
$timestamp = strtotime("now");
echo "  ";
$str = date('l dS of F Y h:i:s A', $timestamp);
echo $str;
?>

<p>

<?php
echo strtotime("next Thursday"), "";
$timestamp = strtotime("next Thursday");
echo "  ";
$str = date('l dS of F Y h:i:s A', $timestamp);
echo $str;

View Replies !
Strtotime Problem
How do I find the number of seconds from a certain date to the current? I have logged in my database a completion date within the past year and I want to figure out how many seconds it has been since the completion date until now. I know the strtotime command is fairly versatile and I have tried the following without the right conclusion: PHP Code:

strtotime("since ".$completion_date);
//and
strtotime("from ".$completion_date);

What do I need to do to fix this?

View Replies !
Why Doesn't Strtotime('') Return -1
instead of the warning message:
strtotime(): Called with empty time parameter in ...

Any good reason?

View Replies !
Strtotime Busted
$thing = "2005-10-01";
$storedDate = date("z",strtotime($thing));
echo $storedDate;

it just alwats returns today's date, ive tried it on a php5 server and it worked fine however on the server I need this one it is PHP4.2.

View Replies !
Fpassthru And Fopen Failure In Internet Explorer
has anyone experienced using fpassthru and fopen?

I'm experiencing massive problems in internet explorer, i've created a smaller basic script shown below to try and solve the problem but as yet nothing.

im using php sessions to manage logins so the use of htaccess is not available so the files are stored outside the public_html folder

every combination of headers i have use has worked flawlessly in firefox but not in ie6.

PHP Code:

View Replies !
Apache 1.3.27, PHP 4, SuSE 8.2 PRO - Form-Post Failure
I've recently done an upgrade installation to SuSE PRO 8.2 from
same/8.0.

The problem now is that I don't seem to be receiving data from forms
to PHP-processing pages using either POST or GET for the form method.

When I use GET, I see that the URL has been correctly formed with the
variable name embedded in the URL along with the properly formed
value:

http://www.whatever.com/test.php?ma...Process+Request

Then, in a sample php script:
<?
print "main: $main<BR/>
";
if ($main == "") {
print "main is blank<BR/>
";
}
?>

All I get in the output HTML on the test php script is the "main: "
portion of the print command - the variable is reported as a null and
tests positive for a null.

The php function test() shows mod_php4 is loaded. I have
performed/duplicated these results with the firewall on and the
firewall off. Not that I think the firewall is an issue since the GET
method shows, via the URL, that the variable information is passed
across forms. But I did read somewhere that a firewall can impact the
POST method so I turned it off to try it - no change in the results.

Even tho the info is being passed (GET), it's not accessible by
var-name access in the PHP script. All the php scripts on my server
are so affected and were working prior to the upgrade.

Any ideas? I also suspect this is why my squirrelmail installation
stopped working.

View Replies !
MySQL Connect Failure - Command Line
I have the following code

$Host = "localhost";
$User = "Fred";
$Database = "house";
$Password = "mypw"

echo "before mysqli<br />Host: " . $Host . "<br />" . $User . "<br />" .
$Database;

@ $db = new mysqli($Host, $User, $Password);

echo "Connection is " . mysqli_connect_errno();

The first echo is executed but the second is not. I have ran the very same
parameters from the command line using:

mysql -h localhost -u Fred -p

Then

use house

and I connect to the house database.

I tried this in both IE 7 and Firefox with the same results.

View Replies !
Telling The Difference Between Zero Rows Returned And Failure
Suppose I make a call to MySql and zero rows come back. How do I tell
the difference between zero rows and failure?

View Replies !
FilterEvasion, Character Encoding And Preg_match Failure
I'm concerned about filter evasion. Take this regexp to match a : (colon)

$subject='test colon here : (normal)'
if (preg_match('/(:)+/',$subject)){print '<br/>found a colon in "'.subject.'"'}
else {print '<br/>did not find a colon in "'.subject.'"'}

All well and good but there is more than one way to write a colon. Code:

View Replies !
Strtotime Missing A Zero In Minutes
I am working with strtotime. The following problem occurs when using this function:

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved