-
Posts
90 -
Joined
-
Last visited
Never
Posts posted by pakenney38
-
-
I have an HTML form that submits to a PHP page which I want to display the form (filled out) as a receipt of the submission. This PHP page uses the Form variables from the HTML page to set the default values of the fields in the PHP page. When displayed as a receipt in the PHP page, I want to make it so that the user of the form cannot type in anything other than the default value, BUT also make it so that the fields are not greyed out.
Any clue? -
Does anyone know what I am supposed to use for the $image variable here?
I seem to get this a lot:
Warning: imagestringup(): supplied argument is not a valid Image resource in c:\Inetpub\wwwroot\pprs\pilot_pay_review_sheet.php on line 60 -
OK, I've made a little progress. It helps to use my PC as a test PHP server. First of all, I added C:\PHP to the PATH. Then I configured php.ini for GD2. Then I copied all the extension from the zip distribution of PHP 5 into my C:\PHP\ext folder. Now at least I don't get call to undefined function.
So now I am going to start with something like this
imagestringup($image, 1, $x, $y, 'TEXT', $text_color)
I will start plugging in numbers and see what happens. -
imagestringup ( resource image, int font, int x, int y, string s, int col )
Does anyone know how to use this thing?
In the context of what I am working on, I am creating an online form, and I need text to be drawn vertically within a table cell. However, I do not understand the official PHP manual in most cases, but once the functions are demonstrated, I "get it."
So in this case, what is an example of how imagestringup would be used?
Also when I have attempted to use imagestringup(), I get a call to undefined function, as if my PHP server didn't know what imagestringup() is. Not sure that maybe if I used it correctly, then I would not have this error, but in the past when I've had this error, the function is either not enabled in php.ini, or no longer exists. -
I am going to bump this post because I know quite a few people who would like to figure out how PHP and AD are supposed to work together.
-
Sorry about that. I had to do some "editing" on my post. It was a little too revealing.
-
So here is the offending code:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?PHP
$ldaprdn = 'USR@domain.net';
$ldappass = 'PWD';
$ds = 'server.domain.net';
$dn = 'dc=domain,dc=net';
$ldapport = 389;
$ldapconn = ldap_connect($ds, $ldapport)
or die("Could not connect to LDAP server.");
if ($ldapconn)
{
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
if ($ldapbind)
{
echo "LDAP bind successful...";
$filter = "'cn=*Kenney*'";
$fields = array("ou", "mail");
$sr = ldap_search($ds, $dn, $filter, $fields);
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++)
{
echo "<br>";
echo "ou: " . $info[$i]["ou"][0];
echo "mail: " . $info[$i]["mail"][0];
}
}
else
{
echo "LDAP bind failed...";
}
}
ldap_close($ldapconn);
?>
[/quote]
Here is the result:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]LDAP bind successful...
Warning: ldap_search(): supplied argument is not a valid ldap link resource in e:\intertest\test.php on line 20
Warning: ldap_get_entries(): supplied argument is not a valid ldap link resource in e:\intertest\test.php on line 22
[/quote]
I know I'm just misusing the ldap_search() function or something, so please, someone set me straight here. -
Later on, I tried just enabling the extension in php.ini and it worked. Sorry to waste bytes.
-
This is probably a total newb question to many of you, but I am stuck with a Windows environment for the time being and need to get LDAP support working in PHP 5 on my Windows intranet server.
The first question is, do I need to recompile PHP for Windows to get LDAP support? The manual isn't very clear on whether I should recompile first and then move the appropriate DLL files to SYSTEM, or just move the files to SYSTEM.
So the second question is, how do I recompile for Windows if I have to? Any recommended compiler? I was going to use the new Visual C++ 2005 Express Edition if it's feasible. -
nevermind. I rewrote the code to use mail() instead of PHPmailer. Since I already knew this method, it worked. The only issue I have with it is that our SMTP server requires that the outgoing email address be described very specifically, and I'm having a hard time masking this address. But that's another thread.
-
code soon to be posted...
-
I will pull the code together and post it tomorrow from work.
In a nutshell, say I have some PHP code. I want to process that PHP code into HTML first, and then send the HTML through an e-mail message. Right now I can't make that happen with PHPmailer without getting a parse error, even if I escape all of the double-quotes and stuff. I may just be missing something.
By the way, as a separate argument, mailing lists are a nuisance. Basically you are force-fed all of this mail that you may not be able to help with, but you get it in your Inbox anyway. At least with a message board, you can pick and choose what you want to reply to, without having to sort or delete anything. Mailing lists are archaic. -
I thought the PHPMailer class was fairly common. Guess I was wrong. Well, I will try to get mail setup up in my php config to use our SMTP server then.
-
In PHPMailer's syntax there is this thing:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]$mail->Body = "";[/quote]
Is there any way to put PHP code and double quotes inside this statement to send out a dynamic-type HTML e-mail message? I've tried escaping double-quotes and all that, but it never seems to work.
Prevent user from typing new info into form.
in PHP Coding Help
Posted