php-windows Digest 21 Oct 2004 18:35:07 -0000 Issue 2436
Topics (messages 24788 through 24796):
Post method not working
24788 by: Brian
24789 by: Janet Valade
24791 by: Sudeep
COM Object and Acrobat 6
24790 by: Weber Bernd-Thomas
24795 by: Gryffyn, Trevor
Re: MySQL Errors
24792 by: Robert Schipper
24793 by: David Hamilton
24796 by: MikeA
Changing loaction of php.ini file
24794 by: Rafael Soares | Ag�nciaM
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
OK, I'm new to php, so be gentle :)
I have just installed PHP 5.0.2 on Windows XP Pro\IIS 5
I am learning PHP with one of those step by step books, and I have run into
an issue with forms. They don't seem to be getting the variable I am
passing.
This code works:
<?
$testvar = "this is a test";
print $testvar;
?>
But this does not:
<?
print "You chose a $borderStyle border";
?>
Even when I put 'filename.php?borderStyle=test' in the browser, with the
entire url of course, it still only shows the print text, but not the
variable.
Any thoughts? I have also verified that the mappings are set with .php with
verbs set to all or even GET, POST.
Thanks for any help
Belgarath the Ancient One
--- End Message ---
--- Begin Message ---
Brian wrote:
OK, I'm new to php, so be gentle :)
I have just installed PHP 5.0.2 on Windows XP Pro\IIS 5
I am learning PHP with one of those step by step books, and I have run into
an issue with forms. They don't seem to be getting the variable I am
passing.
This code works:
<?
$testvar = "this is a test";
print $testvar;
?>
But this does not:
<?
print "You chose a $borderStyle border";
?>
Even when I put 'filename.php?borderStyle=test' in the browser, with the
entire url of course, it still only shows the print text, but not the
variable.
Any thoughts? I have also verified that the mappings are set with .php with
verbs set to all or even GET, POST.
I'm not entirely sure what you are asking. But I think it might be that
you need to use
$borderStyle = $_GET['borderStyle'];
print "You chose a $borderStyle border";
or for a posted form
$borderStyle = $_POST['borderStyle'];
print "You chose a $borderStyle border";
Janet
Thanks for any help
Belgarath the Ancient One
--
Janet Valade -- janet.valade.com
--- End Message ---
--- Begin Message ---
Hi brian,
You have an error in line: print "You chose a $borderStyle border";
It should be like this:
print "You chose".$_GET["borderStyle"]."border";
B'cause $_GET["borderStyle"] is the correct way to capture things that are sent thru
url.
And for POST variable it should be $_POST["borderStyle"]
Try it....
...SuDeEp...
Brian <[EMAIL PROTECTED]> wrote:
OK, I'm new to php, so be gentle :)
I have just installed PHP 5.0.2 on Windows XP Pro\IIS 5
I am learning PHP with one of those step by step books, and I have run into
an issue with forms. They don't seem to be getting the variable I am
passing.
This code works:
$testvar = "this is a test";
print $testvar;
?>
But this does not:
print "You chose a $borderStyle border";
?>
Even when I put 'filename.php?borderStyle=test' in the browser, with the
entire url of course, it still only shows the print text, but not the
variable.
Any thoughts? I have also verified that the mappings are set with .php with
verbs set to all or even GET, POST.
Thanks for any help
Belgarath the Ancient One
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,
I try to access Acrobat 6 as COM Object. My problem is that I don't know the
aviable methods.
I want to rotate all landscape and then add page numbers.
Any ideas?
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Weber Bernd-Thomas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 21, 2004 7:33 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] COM Object and Acrobat 6
>
> I try to access Acrobat 6 as COM Object. My problem is that I
> don't know the aviable methods.
>
> I want to rotate all landscape and then add page numbers.
>
> Any ideas?
Something the guy in the link below recommands, which is a pretty good
way to go if you can't find a document online that lays it all out, is
to (if you have it), load up an MS Office product like Excel or Word and
go into the VBA editor. If you go under Tools -> References and add the
reference to Acrobat (Exchange or Distiller or whatever), you can use
the object browser (F2) to look at all the available properties and
methods and such. It's doesn't usually explain things well, but it
gives you the names at least.
Microsoft, with some of their products, have their Object Models on
their MSDN site and those can be GREAT at letting you know what's
available for COM calls. But some of their products have terrible
object models online. Sometimes you can find information by searching
for the program's "API" specs.
I tried to find an object model for Acrobat and Adobe's site seems to be
lacking good information on it. But using the VBA Editor might put on
on the righ path.. Or at least give you some object names to search for
online for better explainations.
Anyway, the link below, he says to use either "Exch.application" or
"PdfDistiller.PdfDistiller" for the application identifiers. That's a
start. And he makes reference to an Adobe Technical Note that I find
for sale in a book, but had trouble finding it on Adobe's site.
http://www.phpbuilder.com/columns/alain20001003.php3?print_mode=1
These guys are saying that the addin isn't documented. But if you go
into the VBA editor as described above, it should show you what's
available. I don't have Acrobat Distiller or Exchange installed so I
can't see what's in there myself.
http://www.planetpdf.com/forumarchive/94567.asp
Finally, I found this:
http://www.planetpdf.com/forumarchive/75343.asp
They say to look for the Acrobat SDK and inside you'll find the IAC
(Inter-Application Communications) Reference for a list of methods and
properties and the IAC Overview for a list of objects you can use.
Hope this helps!
-TG
--- End Message ---
--- Begin Message ---
hello mikea,
looks like there is something missing in your sourcecode, which you
should have provided. do you give any arguments to
mysql_fetch_array() ? Do you check if it is not false?
your code should look like this:
$sql = "SELECT * FROM example";
$result = mysql_query($sql,$db);
if ($result) {
$myrow=mysql_fetch_array($result);
} else {
echo "ERROR: SQL-query returned false!";
}
Robert
Mikea wrote:
I am getting the following errors when I execute a php script.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource
What do I need to make this work? I am new to PHP. I read something about
mysql.class.php somewhere. Do I need that somewhere? Do I put an include
in the main script? Where does mysql.class.php go directory-wise?
I am sure I am not giving enough information and may not be explaining it
good enough. My apologies. Again, I am new at this.
I appreciate any help. Thank you in advance.
Mike
--- End Message ---
--- Begin Message ---
This might also be of some help.
Change your result and fetch lines to read:
$result = mysql_query($sql,$db) or die (mysql_error());
$myrow=mysql_fetch_array($result) or die(mysql_error());
David
-----Original Message-----
From: Robert Schipper [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 7:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: MySQL Errors
hello mikea,
looks like there is something missing in your sourcecode, which you
should have provided. do you give any arguments to
mysql_fetch_array() ? Do you check if it is not false?
your code should look like this:
$sql = "SELECT * FROM example";
$result = mysql_query($sql,$db);
if ($result) {
$myrow=mysql_fetch_array($result);
} else {
echo "ERROR: SQL-query returned false!";
}
Robert
Mikea wrote:
> I am getting the following errors when I execute a php script.
>
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result
> resource
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> resource
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result
> resource
>
> What do I need to make this work? I am new to PHP. I read something
about
> mysql.class.php somewhere. Do I need that somewhere? Do I put an
include
> in the main script? Where does mysql.class.php go directory-wise?
>
> I am sure I am not giving enough information and may not be explaining
it
> good enough. My apologies. Again, I am new at this.
>
> I appreciate any help. Thank you in advance.
>
> Mike
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
This is an applic that I got off the internet that I am trying to install.
An example of the code follows.
if ($action=="memberlist") {
/* get the total number data and find out what the grand total is */
$sql = "select id, title, price from ad_details where member_id=" .
$_SESSION['login_id'];
$sql .=" order by $orderby $order LIMIT $limitvalue, $user_view_limit ";
$sqlcount = "select count(*) from ad_details where member_id=" .
$_SESSION['login_id'];
} else {
$sql = "select a.id, a.title, a.price from ad_details a, ad_cat_join j
where j.cat_id=$current_cat_id ";
$sql .="and a.id=j.ad_id order by $orderby $order LIMIT $limitvalue,
$user_view_limit";
$sqlcount = "select count(*) from ad_details a, ad_cat_join j where
j.cat_id=$current_cat_id ";
$sqlcount .=" and a.id=j.ad_id";
}
$sql_countresult = mysql_query($sqlcount);
list($totalrows) = mysql_fetch_row($sql_countresult);
$res = mysql_query($sql);
$num_ads = mysql_num_rows($res);
I did not code this and I'm struggling to understand the applic and PHP! So
I'm up to my armpits in alligators! LOL
Thanks.
Mike
"Robert Schipper" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hello mikea,
>
> looks like there is something missing in your sourcecode, which you
> should have provided. do you give any arguments to
> mysql_fetch_array() ? Do you check if it is not false?
>
> your code should look like this:
>
> $sql = "SELECT * FROM example";
> $result = mysql_query($sql,$db);
>
> if ($result) {
> $myrow=mysql_fetch_array($result);
> } else {
> echo "ERROR: SQL-query returned false!";
> }
>
> Robert
>
> Mikea wrote:
>
> > I am getting the following errors when I execute a php script.
> >
> > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result
> > resource
> > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> > resource
> > Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> > resource
> >
> > What do I need to make this work? I am new to PHP. I read something
about
> > mysql.class.php somewhere. Do I need that somewhere? Do I put an
include
> > in the main script? Where does mysql.class.php go directory-wise?
> >
> > I am sure I am not giving enough information and may not be explaining
it
> > good enough. My apologies. Again, I am new at this.
> >
> > I appreciate any help. Thank you in advance.
> >
> > Mike
--- End Message ---
--- Begin Message ---
Hello.
I have PHP installed and working well on IIS 5.1.
But I�ve installed a CMS that configures its own php.ini file, saving a
backup of mine, name php.backup.ini.
There isn�t a way to change the location of one of them? It�s so boring to
change the name of each file every time I�ll work on a different server�
tks
Rafael | Ag�nciaM
Fone: +55 11 4616-1394
--- End Message ---