rogerzebra
Technical User
Hi friends,
I'm back with another issue. Excuse me for my freakvent postings. I'm working on a system with alot of strange requests, wich I obviously have hard time to solve by myself. I hope that you guys are patience, I'm still learning.
Anyhow here's my next problem. I have a submission form which submits a date and register the time based on an existing date in the database when it's executed. Everything works fine, but now they want me to add another feature that when executing this form also send a pdf document in the very same execution, based on the client's name or id.
One problem i see with this is that phpmail needs the full path to the actual document like so,
$mail->AddAttachment("C:/something/something/test3.pdf", 'test3.pdf');
which is a static name path, I need a dynamic name path based on a value from the formpage. In other words a dependend mail path based on a clientID or ClientName value.
Question: Is it possible to use a variable as a value in the path based on ID or Client Name as in a select query with a where clause like so,
I want to change the value test3.pdf to a dynamic value. Is it possible? Or is there a better way to do this?
Thanks for your time and as you can see, the problem I have is rather difficult and needs someone with more experience than I have. All efforts are welcome and much appreciated
/rz
I'm back with another issue. Excuse me for my freakvent postings. I'm working on a system with alot of strange requests, wich I obviously have hard time to solve by myself. I hope that you guys are patience, I'm still learning.
Anyhow here's my next problem. I have a submission form which submits a date and register the time based on an existing date in the database when it's executed. Everything works fine, but now they want me to add another feature that when executing this form also send a pdf document in the very same execution, based on the client's name or id.
One problem i see with this is that phpmail needs the full path to the actual document like so,
$mail->AddAttachment("C:/something/something/test3.pdf", 'test3.pdf');
which is a static name path, I need a dynamic name path based on a value from the formpage. In other words a dependend mail path based on a clientID or ClientName value.
Question: Is it possible to use a variable as a value in the path based on ID or Client Name as in a select query with a where clause like so,
Code:
SELECT Client Name
FROM table1, table2
WHERE table1.ID = table2.ID
AND ClientName ='$ClientName';
Thanks for your time and as you can see, the problem I have is rather difficult and needs someone with more experience than I have. All efforts are welcome and much appreciated
/rz