$numresult=mysql_query($sql)
or die( "4 QUERY ERR $sql");
echo "numresult = $numresult";
$numrows=mysql_num_rows($numresult);
mysql_free_result($numresult);
echo "You have selected " .$numrows ."
record(s).";
When I run the script above on php4 windows I get the
following result:
numr
Warning: Supplied argument is not a valid MySQL result
resource in c:\program files\apache
group\apache\cgi-bin\emp.php3 on line 10
$db = mysql_connect("localhost", "", "");
mysql_select_db("employee",$db);
$result = mysql_query("SELECT * FROM employees",$db);
echo "";
echo "";
echo "Name";
echo
php4.1.1.exe was installed in C:\My Documents
directory.
Do I need to include a path to the php intepreter?
C:\My Documents\php4.1.1
__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
--
PHP General M
I have downloaded and installed php4win(4.1.1) from
www.php4win.com
The URL http://localhost tells me that the Apache Web
Server was installed successfully.
What steps do I take from here to display a
php 'Hello World' script in the browser?
Do I need to modify httpd.conf?
How can I make sure the user enters a date in format
mm/dd/ and the date must be between the year 1600
and 2038.
The script below meets the criterion above, except
mktime() or strtotime() does not validate year 1600
dates. Any suggestions? Thanks
$dateparts = explode('/', $Date);
$month =
$date1 = "10/12/2002";
$date1 = date("D M j Y", strtotime($date1));
$date2 = date("D M j Y");
$date3 = date("D M j Y", $date1);
print $date1."";
print $date2."";
print $date3."";
The code above gives me the following output:
Fri Oct 11 2002
Mon Feb 4 2002
Wed Dec 31 1969
Is the strtotime()
$date1 = "12/12/2001";
$date1 = date("D M j Y", strtotime($date1));
print $date1."";
When I execute the code above I get the following
output:
Tue Dec 11 2001 instead Wed Dec !2 2001
Why does this happen and how can I get the Dec 12
output? Thanks
___
I would like to prevent users from uploading a file
that contains more than 4 pipes or less than 2 pipes.
The code below prevents users from uploading a file
containing more than 4 pipes, but not less than 2
pipes. Should I use awk, ereg, or sed? Thanks
system ("/bin/cat $userfile|/bin/sed -n
How can I count the number of lines in the uploaded
file. ($userfile)
What's wrong with the command below. Thanks
$fp = popen ("usr/bin/wc -l $userfile", "r");
__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auction
When using the mail () function to send an email to a
linux server the header information shows two from
addresses. (1)e-mail address that was defined in $from
variable in the header. (2) [EMAIL PROTECTED]
Can someone explain this? I only want the $from
variable to show up in the header. Can
I would like to pass the "$text" variable to the body
of an email message in another php script.
The code is below:
< -- upload.php -- >
if (!$file=fopen(text.txt", "r")) {
echo "Could not open file";
}
else {
$text=fread($file, 100);
fclose($file);
}
< -- mail.php -- >
$to =
I would like my php script to e-mail a file upload.
Can someone give me an example of how this might be
done? Thanks
__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--
PHP General Mailing List (http://www.ph
PATH (pointing to the lib directory that
> contains the
> libiodbc.so file)
>
> DSNs need to be configured in the odbc.ini
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software http://www.openlinksw.com
> Universal Data Access &
.openlinksw.com
> Universal Data Access & Data Integration Technology
> Providers
>
> > -Original Message-
> > From: toni baker [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, October 25, 2001 4:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] php/Ora
I have successfully compiled php with linked iODBC
driver manager as an Apache shared module. However
when trying to connect php to the Oracle database I
get an error. The error and the sample connection
code is below.
Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host,
SQL state 08004 in SQ
Hi
I want to use php to connect to an Oracle 8i database.
I have 2 questions:
1) does the webserver have to be installed on the
database server?
2) do you have to use the OCI libraries?
Thanks
Toni
__
Do You Yahoo!?
Make international
16 matches
Mail list logo