Greets,
The following code snippet receives data from a textbox named searchtext if
the user types in a word.
It then tries to match that word from the mysql database using:
$searchtext = $_POST['searchtext'];
if ($searchtext != '') { // Some search text was specified
$where .= " AND blurb LIKE
In the following snippet, which uploads binary files to a mySQL database it
works fine when Register Globals are set to ON.
.
mysql_connect("localhost","root","pass");
mysql_select_db("adatabase");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=my
If you get a chance please run the following script _without_ entering a
name in the textbox.
Does the same page load after you hit submit or does a different page load?
Thank you.
TR
...
Sample Page
Please enter your name:
Your name:
This para
The following script is from Kevin Yank's book (Sitepoint).
When I test it _without_ entering a name in the text box and hit submit, the
_next_ page
loads - however the same page should load beacuse of the conditional
if (!isset($name) ):
.
If I replace
!isset()
with
empty()
li
test
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I currently have websites with two ISP's.
I am getting a lot of warnings throughout a .php script on one server - such
as:
php_hostconnect()
I have used the _same_ .php script exactly on my other ISP's server and I
don't get any warnings.
In addition, I have tested this script locally on Apache
From: "Mike Brum" <[EMAIL PROTECTED]>
> It's very possible that they're not letting you relay through them since
> you're not providing any authentication for that mail server but just
trying
> to send (as far as it can tell) "random mail from an unknown
sender"...[snipped]
Thanks
Using php/apache/mysql
I am testing an mail script.
The script has a .html form which receives the text input and then a .php
script to execute the variables in a mail() function.
When I publish both files - the .html and .php - to my ISP's server and
enter the data and hit submit I receive an
Greetings all,
I'm looking for a tutorial or some assistance in explaning how store and
then open and read a binary file using php/mysql.
I've got a few tutorial about storing the binary data within a mysql table
from Kevin Yank, phpbuilder, etc. but I've heard that it's sometime better
to keep yo
Using mysql, php, apache on win98
The following code is from "PHP, mySQL and Apache" (SAMS) by Julie Meloni.
Page 338-339 (hour 16).
After choosing my selections in the form box and hitting submit I get:
...
Warning: Invalid argument supplied for foreach() in
c:\apache\htdocs\listin
Hi...
I'm trying to output a table with alternate background color rows.
The following snippet outputs a table after connecting to a mySQL database
with posts but all of the rows have the same bgcolor.
Any help with the syntax will be greatly appreciated.
Thank you.
Tony Ritter
..
Maybe someone can give me a heads up on this code.
Ideally what I am looking for is this:
The user submits their email address for registration.
Before the e-mail gets submitted to a database, if it's bogus the user does
not get an e-mail confirmation sent back to them.
However, If it's a vaild
Is it possible that .gifs are currently _not_ supported in php 4.2+ at
php_gd2.dll - however .png files would be due to copyright expiration of
.gif patent at Unisys?
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Neil Smith wrote in message:
> Err this is fairly basic stuff. Have you tried dragging the file into an
> open browser window instead ?
.
Yes Neil.
I tried that and that works. It shows the image of the .jpg file within the
browser on the upper left hand side.
However i
Greetings all,
Using PHP 4.1.1 / Apache Server / MS Win 98 / IE 5.5
The following script is from Julie Meloni's book PHP Fast and Easy on page
170-174.
The first part is an html form in which the user browses and chooses a file
to be upoloaded to the server.
The script works fine in that when I
I ran a phpinfo()
on their server which hosts my site and gd libraries is nowhere to be found.
The following is from the sysadmin at my ISP:
...
Give it a shot and let me know if it works. I put the file in the PHP
directory on the server. I couldn't get the file from t
The following script works fine when I test it at home using localhost on:
MS Win 98
Apache Server
PHP 4.1.1
php_gd.dll
I then publish the script to my web at my ISP's MS IIS server which is the
host and get an undefined function call of:
ImageCreate()
The ISP has said that they have installed
In the following php script, the function takes the original file and crops
to the destination file.
I've ran the script using a .png file and a .jpg file.
The .png works fine whereas the .jpeg file returns only part of the image
along with a blue rectangle.
For instance - where the original ima
Many thanks Warren.
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How can I incorporate the text - "This is a square" - under the .jpg file?
The following php script outputs the reduced square but no copy.
Thank you.
Tony Ritter
..
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, vis
I'm looking for a php tutorial or script which can open and read an existing
.jpg or .png from another URL.
Next, the script then modifies that image by - say - cropping off the bottom
by 20px or resizing it by 50%.
Lastly, could this modified file then be renamed on ones server?
Many thanks,
To
Christoph Grottolo wrote in message:
> The manual says that you have to check if creation from url works.
> Maybe you check first if your script works with a local jpg, then if
> you can include a remote url (include ("http://www.nytimes.com";);).
> To send the image you must use:
> header("Con
Using PHP 4.1.1. / Apache / Win 98
I'd like to use a .jpg from another URL - say:
http://www.blah.com/foo.jpg
and turn it into a variable using PHP and then once it is a variable to try
to manipulate that image using GD Libraries which are installed.
Is this possible?
I tried placing the strin
Thank you to all that came to my aid while I was muddleing through my
attempts to install GD Libraries.
Since I had various versions of PHP from textbook CD's - I downloaded PHP
Triad which happened to be PHP version 4.1.1
I changed two lines in the php.ini file and ran the phpinfo() function cal
Sven,
I've got five screenshots at this URL:
www.gonefishingguideservice.com/php1.htm
If you get a chance please take a look.
I got php_gd2.dll from the zipfile (see photo) and the "extensions"
sub-directory were not there when I installed.
I don't have any other extension working.
Many thanks
P.S.
If you get a moment, maybe you could send me a .txt file of your php.ini
file along with you php_gd2.dll setup.
That way I could check line for line.
Many thanks,
TR
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--
PHP Windows Mailing List (http://www.php.net/)
To
Sven,
I've checked my php.ini files on my drive and all I've got is one.
The php_gd2.dll file is in:
C:/PHP/extensions
There was no default folder called extensions when I installed PHP so I made
a directory called extensions under PHP.
Everytime I take out the semicolon in the .ini file, the p
I did.
The php.ini file is below:
Everytime I take out the semi-colon in the php.ini file, the page won't
load, the server hangs up and I have to shut down the Apache monitor
manually.
When I insert the semicolon back in to the .ini file , the page then loads -
but that doesn't help if I want to
Say I wanted to use:
php_gd.dll
after uncommenting the line in the php.ini file - where exactly would that
file - php_gd.dll - reside?
Many thanks.
TR
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit
I run the following script:
// the page loads o.k. when the semi-colon remains as in:
;extension=php_gd2.dll
but if I remove the semicolon as in:
extension=php_gd2.dll
the page won't load and the server hangs up.
..
\\ this is my php.ini file on MS Win
Would that be:
php-4.3.1-Win32.zip
and
php-4.2.3-installer.exe
Please advise.
Thank you.
TR
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I want to thank those who tried to help with my questions about using the GD
libraries.
I still have not gotten them to function using PHP.
I've put two screenhots of the phpinfo() page at:
www.gonefishingguideservice.com/php_page.htm
If you care to take a look at those images, you'll see that
Rich,
On MS Win 98 / Apache / PHP 4
If somebody out there using Win can check my php.ini file and advise me what
I'm doing wrong.
I have uncommented:
..
extension=php_gd.dll
..
and have included:
..
extension_dir = C:\php4\extensions
...
In my php.ini file, this is what it looks like:
..
extension_dir = C:\php4\extensions\; directory in which the loadable
extensions (modules) reside
extension=php_gd.dll
...
Thank you,
TR
--
PHP Windows Mailing List (http://www.php.net/)
To
Using MS Win 98 / PHP 4 and Apache.
I tried running the following script but got an undefined call to:
ImageCreate()
The following copy is located in my php.ini file...one of which is:
..
;extension=php_gd.dll
..
I tried uncommenting this line to no avail.
What is
My guiding season begins in April.
Anybody out there know where I can purchase a nice mysql dolphin t-shirt?
Thank you.
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Working on:
Win 98 / mysql 3.23.55 / php 4
I installed mysql 3.23.55 and wanted to check the user table in the mysql
db.
The query was:
SELECT User FROM user WHERE host='localhost';
The output was:
xx
user |
xx
||
||
root
The file has been uploaded and resides on my ISP's IIS server.
TR
...
- Original Message -
From: "Sean Malloy" <[EMAIL PROTECTED]>
To: "Anthony Ritter" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sen
Using MS Win98 / php 4:
Any ideas on how I can change my permssion settings on a file called
data.txt so it can be read to and written to or do I have to take that up
with my ISP.
I get the following after I submit a form:
Warning: fopen("data.txt", "a+") - Permission denied
Joseph,
Thanks for the reply.
My ISP has a MS IIS server.
I am testing the following script on Apache Server / MS Win 98 / IE 5.5 and
it works fine.
When I publish the script to their server and try the formpage, I get:
"inetpub...Undefined index 1...
"inetpub...Undefinded index 2...
"inetpub..
Hi,
I'm testing the following form on:
MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
However...when I publish the
.php file
and the
data.txt file
on the ISP's MS IIS server, I get undeclared variables and indexes when the
form page loads.
The script follows.
Any help would be grea
Dl Neil wrote: in message:
> OK Anthony you've got it...(snipped)
>
> The wave is building under you, all you have to figure out now, is which
way
> to stand on the board!
> =dn
> (sorry, that's surfing not fishing, and salt water not fresh...)
..
Thanks again f
To all who assisted me today.
I finally managed to get the mail () funtion to work.
Thank you and happy holidays to you all...
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
O.K. DL...
Thanks for the reply.
And your time. :-{}
Yes. I restarted Apache - it came up the same.
It would seem that Apache works along with php4 since I get the
enviromental variables, etc. page when
I go to:
http://localhost/phpinfo.php
which was saved as:
This is exactly what the lin
DL,
Sorry to be a pain... but using either:
the address of my outgoing mail server
or
localhost
still gives me:
Warning: Failed to Connect in c:\program files\apache
group\apache\htdocs\send_simpleform.php on line 19
Thanks again for your time.
TR
---
[This E-mail scanned for viruses by g
DL,
I have quoted her exactly from her book where it says:
Windows Users:
**Check your php.ini File**
She then writes what I previously posted.
That's it. She offers no alternatives.
Regards,
TR
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--
PHP Windows Mailing L
The following script picks up single .jpg image of a doppler weather map
from another URL:
...
http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp
g";
if(!($fp=fopen($theURL, "r")))
{
print("Could not open the URL.");
exit;
}
$contents=frea
I'd like to have the record data - $current - *within* the html table but if
I run this script it is on a line outside of the table:
http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427
510");
array_pop($content);
$current = array_pop($content
I have a question about the PHP function file_exists():
This is taken from a textbook entitled "PHP Professional Projects" by
Wilfred, Gupta, Bhatnagar (Premier Press 2002 - ISBN1-931841-53-5) on page
261 under the chapter titled "Handling Files".
The authors write...
"Consider the following co
Is there any way to extract *specific* data off a page - like text within
one table (if there were four separate html tables on that page) - while
leaving the balance of the text and the other tables alone?
Thank you.
Tony Ritter
--
PHP Windows Mailing List (http://www.php.net/)
To un
The code that follows is from Welling and Thomson's book on PHP and mysql
(page 372)
I've tried it on Apache/ MS Windows 98 / PHP and I get the following line:
"No quote available."
My questions...
1. Why can't I retrieve the present stock quote?
and
2. What does the variable
$quote
repres
Sorry if my original question was confusing.
This is what I would like to accomplish:
I am currently developing a database on my website using mysql which is on
my harddrive.
I have installed Apache as well and I am using PHP.
My database is functioning fine on localhost.
I would like to find
Using MS Windows 98, Apache, PHP and mySQL.
I've installed Apache on my hard drive to test a database driven website
using PHP and mySQL.
Could somebody lead me through the steps if I want to continue using the
mySQL database and PHP when the site goes live and the files are uploaded
and publish
Using the script below, I was able to connect to the database named
"contacts" for
output.
*However*, when I insert a [username] and [password] in place of the "" "",
I get:
"Couldn't connect to the database" - eventhough I am able to connect to
mysql.
How do I go about replacing the "" and "
I'm new to PHP and am trying this script to see if a cookie has been set on
my server. It has a fifteen minute expiration time.
I'm using MS Windows 98 / Apache
Before I load the browser, I have designated to have the prompt box ask
whether to accept cookies or not to see if, in fact, the cooki
Michael Sims wrote in message:
> Yes, that is true. The "tax" function has the ampersand in the argument
> list, which means that any variable that you send to it gets passed by
> reference. This means that any changes to that variable that occur inside
> the function will actually affect the sa
Michael,
The following is the code taken line for line from Wrox - Beginning PHP - on
page 204.
...
The question really was about the *ampersand* in the argument line which
supposedly changes the value of the va
I'm using Windows98 / Apache and looking at a php snippet from Wrox on page
204.
It goes like this:
..
..
The result in the textbook is 2000 but I'm getting 2500.
It says that to pass an argument by reference you *add* an ampe
Happy holidays everyone.
Right now, if I want to update a fishing report using straight html I have
to type in the data in a .html page and *republish* that information to the
server.
Every time there is an update - say once a day - that information has to be
republished to the server.
This is
mysqladmin | more
It works.
Thank you!
Tony Ritter
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Not sure I understand the sequence of commands.
(this is in Windows 98)
Start/
Programs/
MS-DOS Prompt/
then...
1. cd c:\mysql\bin
2. mysqld-shareware --standalone
3. mysqladmin
I then get the "Welcome to the mysq monitor..."
Where do I type in the command:
mysqladmin > out.txt
and how do
I'm using PHP, Apache and mysql on Windows 98.
My question:
When I log on to the mysql monitor by going to:
Start/
Programs/
MS-DOS Prompt/
then...
cd c:\mysql\bin
mysqld-shareware --standalone
mysqladmin
I then get the "Welcome to the mysq monitor..."
How can I read all the commands that zi
I am trying to create a two step form sequence using three files - one file
is html and the other two are php.
I am using Julie Meloni's book, "PHP Fast and Easy" as my source and the
code is from that book on pp.198-209.
The three files are:
1. show_createtable.html
2. do_showfielddef.php
3.
Thanks Ross.
It works fine.
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Got it to work using the code below.
I forgot the to put in the fclose ()function before the closing brace in my
first post.
Thank you D.
Creating a new file
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
I've got a file that already exists called:
mydata1.txt
I'm trying to test the code below so that if the file is found it will say:
File Exists
When I run the following script, it doesn't write out:
File Exists...
I get nothing on the screen.
eventhough I thought the code below would work.
An
I'm working through Julie Meloni's book PHP - Fast and Easy using MS Win 98
with Apache.
She has an example of a PHP script where both the html form for input and
the php code to send the form are in one php script using the mail()
function and the $PHP_SELF global variable.
I've included the co
I'm trying to pass a variable from a form text box into a php file
(Tony1.php).
Then, I'd like to click on a link in the Tony1.php page and get the
Tony2.php page to load with the original variable -$lname - printed on the
next page (Tony2.php).
The Tony2.php loads when I click the link but the
I'm using Windows 98 with Apache, mysql and PHP.
I'm in the process of learning PHP and would like to find a few tutorials on
PHP/mysql bulletin boards.
I know that there are a few that you can download but I am trying to find a
tutorial that will let me anylaze the syntax and logic of the code
Daniel,
Well...It sure didn't work for me with the comma and space...I got:
Warning: Server Error in c:\program files\apache
group\apache\htdocs\send_simpleform.php on line 10
When I got rid of the second e-mail address and just used one address
everything is back to normal.
Further, I checked
---
From: Ross Fleming <[EMAIL PROTECTED]>
To: Anthony Ritter <[EMAIL PROTECTED]>; PHP Windows mailing
list <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 1:25 PM
Subject: RE: [PHP-WIN] Adding *another* person to an e-mail *to:* address
> stick a comma or a semicolo
Hi,
Thanks to all that helped me out yesterday.
I'm using PHP with Apache on a MS Windows 98 box.
I would like to include a cc to another e-mail adresss when sending an
e-mail.
In addition I would like to *receive* and *also have the cc person receive*
this e-mail as well.
Right now, I am rece
:
...
- Original Message -
From: Daniel Parsons <[EMAIL PROTECTED]>
To: Anthony Ritter <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, November 18, 2001 8:55 PM
Subject: RE: [PHP-WIN] Adding a cc to a PHP mail script...
> If you want to add additional email
Is there any way to add an *additional* e-mail address - a cc - besides the
one that is already in the $to variable below using the following PHP
script?
Thanking all in advance.
Tony Ritter
..
\n";
$mailheaders.="Reply to: $sender_email\n\n";
mail($to,$
Thank you Julie.
It works fine now.
Regards,
Tony Ritter
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I'm reading J.Meloni's tutorial on page 119 in "Fast and Easy" and she is
explaining using the PHP mail function.
I'm using MS Windows 98.
There are two scripts for this example...
One is the .html file which lays out the form with input boxes, a textarea
box and a submit button.
It is:
Si
76 matches
Mail list logo