Posted by one man army on 01/18/06 20:14
Hi All-
I am new to PHP. I found FAQTS and the php manual. I am trying this
sequence, but getting 'no zip string found:'... PHP Version 4.4.0
$doc = new DomDocument;
$res = $doc->loadHTMLFile("./aBasicSearchResult.html");
if ( $res == true )
{
$zip = $doc->getElementById('zipRaw_id')->value;
if ( 0 != $zip ) {
$sql = 'SELECT stuff...' . $zip;
$selected = mysql_select_db($database, $x_testC) ;
if ( !$selected ) {
$res = 'Not connected : ' . mysql_error();
} else {
$Result1 = mysql_query($sql, $x_testC) ;
if ( !$Result1 ) {
$res = 'No query : ' . mysql_error();
} else {
$res = mysql_num_rows($Result1);
}
}
} else {
$res = "no zip string found: " . $zip;
}
} else {
$res = "loadHTMLFile() returned false";
}
-----
in Javascript, this works in the doc
setTextContent( getElementById_s('divZipCheckRes'),
getElementById_s('zipRaw_id').value );
getElementById_s() is a cover func for browser compatability..
-----
I just tried these variations
$elem = $doc->getElementById('zipRaw_id');
//$zip = $elem->getAttribute( 'value' );
$zip = $elem->innerText;
still nothing
any clues?? thanks in advance
====
PHP Version 4.4.0
Configure Command '../configure' '--prefix=/opt/php/4.4.0-mysql.4.1'
'--disable-rpath' '--enable-discard-path' '--disable-debug'
'--with-config-file-path=/opt/php/config'
'--with-config-file-scan-dir=/opt/php/config/php.d'
'--enable-magic-quotes' '--disable-ipv6' '--with-openssl' '--with-zlib'
'--with-mime-magic' '--with-mysql=/opt/mysql/4.1.13a-1.gm'
'--without-pgsql' '--without-pear' '--enable-memory-limit'
'--enable-static' '--disable-shared' '--enable-pcre-regex'
'--with-exec-dir=/opt/php/current/bin' '--with-gd'
'--with-jpeg-dir=/usr/src/software/vanilla/jpeg-6b'
'--with-png-dir=/usr/src/software/vanilla/libpng-1.2.8'
'--with-imap=/usr/src/software/vanilla/imap-2004b' '--with-imap-ssl'
'--enable-pcntl' '--enable-mbstring'
[Back to original message]
|