[PHP] Obtaining a value from dynamic list box

2001-02-22 Thread Claudia

When selecting a value from a dynamically generated list box, the subsequent
value passed to the table truncates when
there is a blank in the string

Here is the table structures (Mysql database)

First table has variable course_name (varchar -- length 50)
This database will be used to generate the dynamic list box for the
course_name field.
Second table has variable issue_course_name (varchar -- length50) and is the
variable that stores the result of the selected
course name in the dynamic list box.

Here is the code that is currently truncating all characters after the
space:

td height="41" bgcolor="#FF">  ';

 $result = mysql_query("select course_name from coursebuild
  where course_status = \"in_test\"
  order by course_name asc");

 echo "";
 echo " Select Course \n";

 if ($myrow = mysql_fetch_array($result))
  {
 do
 {
 echo "$myrow[course_name]\n";
 }
 while ($myrow = mysql_fetch_array($result));
 echo "";

Insert statement

$query = "insert into testissues ( issue_course_name)
values ( '$issue_course_name') ";
  $mysql_result = mysql_query($query, $mysql_link);



-- 
PHP General 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]




[PHP] displaying form array values

2001-02-28 Thread Claudia

I would like to know how to add  form array values to a mail message.

I have my form defined as follows:

 select form name set as:


Not sure
Acapulco
Alabama
Arizona
Bahamas
Baja


I am not sure how to pull the values from the Destination array

Here is some code that does not work: (this script is adding the form info
to a mail message)

$msg .= "Destination:\n";
   $i = 0;

   if ($Destination[$i] !="")
   {

   do
   {
   $msg .= "\t$Destination[$i]\n";

   $i == $i + 1;
   }

   while ($Destination[$i] !="");

   }

I receive an out of memory message -- must be adding the same value over and
over...or something






-- 
PHP General 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]




[PHP] dynamic url from MySql field data

2001-03-16 Thread Claudia

I am attempting to create a dynamic url from a field that has the value of
the dynamic url.

Here is the scenario:

1 - Field in MySql database = $logo_link_var =
page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type
2 - Select logo_link_var from database and assign to $logo_link -- code is:

$search_query = "select site.logo_link_var from site where ( $afl =
site.afl_name )";
$result = mysql_query ( $search_query );

$logo_link = mysql_result ( $result, 0, "site.logo_link_var" ); (only 1
record matches query)
$logo = "";

When I click on the link I receive parse errors -- and the window displays
this section in the url:

page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type

The program is not finding the $afl or $site values

if I create the $logo variable as follows -- it works OK.

$logo = "";

Any suggestions?








-- 
PHP General 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]




[PHP] network error

2001-04-20 Thread claudia

Hi,

has anyone ever seen the message "Network error occured while Netscape
was receiving data ..."

This happens when i save data in my informix database. The values are
saved, but i get the error message when the browser trys to load the new
page. The strange thing is, it happens only sometimes on various sites.
I think it has something to do with the traffic on the site (ca. 400
users).

After inserting a flush() into the page, which i want to load, i get
parts of the new page. I saved this page on disk and had a look at the
HTML, it´s complete, but my browser can´t show it and i get the network
error message.

If i make a "View Source" of the uncomplete page i get:
Missing Post reply data
Data Missing
This document resulted from a POST operation and has expired from the
cache. If you wish you can repost the form data to recreate the document
by pressing the reload button.

I´m working on NT4, php4.0.4pl1, ODBC-> Informix Database

Thanks for any help!

Claudia


-- 
PHP General 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]




Re: [PHP] network error

2001-04-27 Thread claudia

Hi,

maybe now someone can help me.
While i get a "network error" message from netscape i get no message from
ie. It´s like i make a reload on my page and not that i am sending a lot of
data over with my form.
While testing with ie i figured out that the problem, why ie displays
nothing is, because the variable HTTP_POST_VARS is empty and my script
checks the HTTP_POST_VARS variable.
But how can it happen that sometimes HTTP_POST_VARS has data and sometimes
not? I have a Apache Web-Server.

Any idea?

claudia

> Hi,
>
> has anyone ever seen the message "Network error occured while Netscape
> was receiving data ..."
>
> This happens when i save data in my informix database. The values are
> saved, but i get the error message when the browser trys to load the new
> page. The strange thing is, it happens only sometimes on various sites.
> I think it has something to do with the traffic on the site (ca. 400
> users).
>
> After inserting a flush() into the page, which i want to load, i get
> parts of the new page. I saved this page on disk and had a look at the
> HTML, it´s complete, but my browser can´t show it and i get the network
> error message.
>
> If i make a "View Source" of the uncomplete page i get:
> Missing Post reply data
> Data Missing
> This document resulted from a POST operation and has expired from the
> cache. If you wish you can repost the form data to recreate the document
> by pressing the reload button.
>
> I´m working on NT4, php4.0.4pl1, ODBC-> Informix Database
>
> Thanks for any help!
>
> Claudia


-- 
PHP General 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]




[PHP] odbc

2001-05-03 Thread claudia

Hi,

hope it is the right newsgroup.

I have a php application which uses odbc to connect to a informix
database. (NT4, Apache 1.3.x, PHP4.x)
Is it advisable to turn the odbc pooling on?
What else should i take care off when working with PHP and ODBC?

Thanks and Greetings
Claudia


-- 
PHP General 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]




[PHP] using an array with form list values

2001-05-03 Thread Claudia

I need to check that a form entry defined as an array contains a value
before initiating the foreach code in my script.

I have my form field defined in my form as:


Bermuda
California
Caribbean
Carolinas
Florida-Atlantic
Florida-Gulf
coast
Florida-Pan
handle
Hawaii
Mediterranean
Mexico
S.Pacific/Autralia
  ';
   ?>

And my script code as:

 foreach ( $preferred_location as $location )
{
$msg .= "$location\n";
 }

As long as the user selects at least one form value from the list box, the
script processes without error.  If no item is selected -- This msg is
rcved:

Warning: Non array argument supplied for foreach() in
/usr/local/etc/httpd/htdocs/test/beaches/beaches_quote.scp.php3 on line 30





-- 
PHP General 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]




[PHP] emalloc message

2001-05-03 Thread claudia

Hi,

i additional found out, that every time i get the "network error" message i
also get a error message in the apache error log.

FATAL:  emalloc():  Unable to allocate 8426419 bytes

What does this mean, and what can i do?
It´s every time the same amount of bytes.

Please help,

claudia



> Hi,
>
> has anyone ever seen the message "Network error occured while Netscape
> was receiving data ..."
>
> This happens when i save data in my informix database. The values are
> saved, but i get the error message when the browser trys to load the new
> page. The strange thing is, it happens only sometimes on various sites.
> I think it has something to do with the traffic on the site (ca. 400
> users).
>
> After inserting a flush() into the page, which i want to load, i get
> parts of the new page. I saved this page on disk and had a look at the
> HTML, it´s complete, but my browser can´t show it and i get the network
> error message.
>
> If i make a "View Source" of the uncomplete page i get:
> Missing Post reply data
> Data Missing
> This document resulted from a POST operation and has expired from the
> cache. If you wish you can repost the form data to recreate the document
> by pressing the reload button.
>
> I´m working on NT4, php4.0.4pl1, ODBC-> Informix Database
>
> Thanks for any help!
>
> Claudia
>
> --
> PHP General 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]


-- 
PHP General 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]




[PHP] Strings in URL

2001-03-26 Thread Claudia

I am attempting to pass a string value via a URL.  I have tried using
urlencode and ereg_replace--with no luck.

Here is sample code:

$headline=urlencode("$headline");
print "Contact us for more information";

Then in the quotepage.php3 file

if( $page == "miniquote" )
{

print "Get A Quote";
print "$subject";
print "$site";

INCLUDE "mini_quote.inc.php3";
}

--->The print "$subject"; line prints nothing.

If I print $headline right after I assign the variable it prints correctly
with +s in place of the blanks for this variable.

Any suggestions?





-- 
PHP General 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]




[PHP] PHP form script in Javascript window

2001-04-06 Thread Claudia

I am attempting to use a Javascript popup window  to open a new php form
window that uses a php script to process the form data.  All processing for
the form is completed in the popup window.

The issue I am encoutering is occurring with Netscape only -- I receive the
following msg:

Warning there is a possible security hazard here opening 

The called script is used in this statement on the initial form that appears
in the popup window:

   http://www.contus.com/test/miniquote.scp.php3">

The error occurs when the email field is blank or if I enter an incorrect
email address such as cc.

The code to check the email field in my script is as follows:

Name:


  

Please contact me via:

E-Mail

Phone 
  
  
E-mail Address:


  
  
 Please confirm your E-mail Address:


   
   
Click here if you do NOT wish to be on our e-mail
list:

  

  
Phone (with area code):



Any help would be appreciated.  Again this works OK in IE...



-- 
PHP General 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]




[PHP] Pop Up Window

2001-04-08 Thread Claudia

Is there a way to initiate a pop up window containing a form using PHP code?

I am trying to use Javascript to popup a window which contains a form.
The form is processed via a PHP script. (miniquote.scp.php3)
The popup window displays OK.  The form processes OK in IE 5.0 however using
NS 4.7 I receive this error:

"Warning there is a possible security hazard here...opeing
miniquote.scp.php3 using php.exe"  "When you download a file from the
network, you should be aware of security considerations" "A file that
contains malicious programming instructions could damage"You should only
use files obtained from a site that you trust"

The issue is with Javascript as I can use the same code in a html window
with no errors.

Any ideas on how to get around this error would be appreciated!





-- 
PHP General 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]




[PHP] Netscape security error

2001-04-10 Thread Claudia

I am receiving a Netscape security error (version 4.7) when attempting to
submit my form without a complete email address.

Here is the link:

http://www.contus.com/test/golf/page.php3?site=contusgolf&page=golf%20tours&;
ad=golf

At this page choose the any hyper link named "Contact us for more
Information"

A quote form will come up.  My calling script is set up to check the name
and email field or name and phone fields to ensure they are not blank.

Here is the code to check the form fields:

if (isset($miniquote_submit))
 {
 if ( ($sender_name != "") && ( ( ($Contact != "Contact by Phone") &&
($email != "") ) ||
  ( ($Contact == "Contact by Phone") && ($Phone != "") ) )  )

If I enter an incomplete or blank email address I receive the NS security
issue.  The code should be checking the Contact field -- and if it is set to
phone should ignore the blank email field.  Also since my error checking
code is simplistic, it really should allow any value in the email field and
it should process -- however if I simply enter "cc" I receive the same
security error.

I have been looking at this issue for a couple days now.  It works OK for me
on IE-- and also on a different server.  The server that I am having the
problems with has php 4.0B2 installed.

I would appreciate any insight!







-- 
PHP General 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]




[PHP] Sum function

2001-02-18 Thread Claudia


I am looking for code that explains how to sum a value in a database based
on a current field retrieved from the database.

Example:

query = "select course_name, course_build, milestone, testcase, time_tested,
issue_status, comment,
   bug_number, tested_by, date_tested from testissues where test_issue_id =
$viewid";
$result = mysql_query( $query );

1 - retrieve needed fields from database based on the id the user links from
($viewid)
2 - assign the course_name value from the query statement to a variable to
be used on html page

Assign: $course_name = mysql_result( $result, 0, "course_name" );

Use variable:print " $course_name\n";


Now I would like to sum ALL the time_tested values in my database WHERE the
course_name =
$course_name (the variable retrieved for the record)

query = "select sum(time_tested) where course_name = $course_name";
$result = mysql_query( $query );
$total_time = mysql_result( $result, 0, "sum(time_tested)");

First issue -- php does not seem to recognize the value of $course_name
Second issue -- will the $total_time value be calculated correctly based on
the above syntax?







-- 
PHP General 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]




[PHP] summing unkown values

2001-02-19 Thread Claudia

I would like to sum totals for unknown values.

Here is the design

Course names are entered in separate table -- courses
If the course is still being tested the course status = open
This status is stored in the Course table. Each course name is unique
in this table.

Test information including test time is entered in a different table -- issues
The issues table includes the test time and course name values.
Several entries with the same course name will be made to this table

 I would like to sum the total time tested based on Open courses.


First I would like to know how to select the correct courses from the issues database 
based on the course_status in the courses databases.  

Would the following statement work??

$query = "select issues.course_name, issues.time_tested from issues
  where courses.course_status = 'open'";
$result = mysql_query( $query );

Then I need to sum the time_tested fields for all courses with the same name in the 
issues database that were just selected as being Open.

I have been looking for some code that would do something similar to this. 
If anyone can point me to code or has some thoughts I would appreciate.








[PHP] verify phone number

2001-05-11 Thread Claudia Smith

I am looking for code to verify a phone number has been entered correctly on
a form field.  Requirements would include the area code:  xxx-xxx-.





-- 
PHP General 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]




[PHP] Passing variable with slashes in URL

2001-05-16 Thread Claudia Smith

Currently I have a problem with IE.  The IE browser will not bring up my
encoded url.  When clicking on the link I either receive a script error or
nothing happens. The issue is with the double quotes. IE does not recognized
the encoded character %22 for quotes.  IE does seem to process single quotes
(%27) OK.

Here is my code to encode the string variable and create the link

The string I am having problems with = "All Inclusive" Casa De Campo Golf =
$headline

$url_title = rawurlencode( $headline );
print "Contact us for
information";

Here is what the url looks like in the Netscape browser window

header=%22All%20Inclusive%22%20Casa%20De%20Campo%20Golf

If I include this code:

$headline = addslashes ($headline);

before the:

 $url_title = rawurlencode( $headline );

IE now processes the url link and the string displays correctly for me in my
popup window.

Here is the IE url:
header="All%20Inclusive"%20Casa%20De%20Campo%20Golf

However -- NS now displays the string with backslahes.

Here is the comparable NS url:

header=%5C%22All%20Inclusive%5C%22%20Casa%20De%20Campo%20Golf

Here is the code in my form to display the header variable (which I thought
would strip out the slashes)



I have tried htmlentities as:

$url_title = htmlentites( $headline );  and neither IE nor Netscape would
work -- the url link would not work.  perhaps my syntax is incorrect for
this function?

Claudia






-- 
PHP General 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]




[PHP] using ahref tag in $msg variable

2002-03-11 Thread Claudia Smith

I would like to know how to code my mail msg to accept an  tag

my current code is:

$msg = "$username wants you to check out \"The AdVentures of AdWoman:
AdWoman's Dilemma.\"\n\n";
$msg .= "Play for a chance to win a Caribbean cruise presented by
Carnival Cruise Line and Contus.com.\n\n";
$msg .= "This adgame is presented by the American Advertising
Federation, which cordially invites you to attend the  AdVentures Conference, the AAF's National
Convention in Miami, Florida June 5-8.
 $msg .= "This adgame was created by AdGames.biz.\n\n";
   $mailheaders = "From: [EMAIL PROTECTED]\n";
$mailheaders .=  "Reply-To: [EMAIL PROTECTED]\n\n";
mail("$friendemail1", "$username Referred you an Adgame!", $msg,
$mailheaders);

My auto response email is printed with the < a href=code instead of
creating the hyperlink for me.

Any suggestions on how to create this type of hyper link in a non html
email?

Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] passing string variables in url

2001-04-09 Thread Claudia Smith

I am passing a string value via a url to be used for printing on a page and
for sending info via email.

 I first encode the string before passing it.

The issue I have is for strings that contain single or double quotes.  When
I print the value that has been passed in the url the \ is printed.  For
example:  A Golfer\'s Paradise

I have to tried to decode the string before printing it -- but the \ still
prints.

Here is the code:

$url_title = rawurlencode( $headline );
  print "Contact us for more information";

And the in the miniquote_form.inc.php3 file:





-- 
PHP General 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]