PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi mates,
As you see the following snapshot, i'm trying to build a contact form on a php5 server.
my code worked well with PHP4 server, however after upgrading the server I got the following message.
This really mess up the display of my website. Can anyone help with my code below?
Nothing in the code you gave sets the value of $title. Check the rest of your code to make sure that $title is definately being set before that code is run.
iankent wrote:Nothing in the code you gave sets the value of $title. Check the rest of your code to make sure that $title is definately being set before that code is run.
Hi iankent, I know i need to set it, but I'm very new in php, i don't know where and how to do it. Could you help me please? Thank you!
Unless you include reg_process in this file, or reg_process includes this file, this file does not have access to the variables in your reg_process file. Thus, it is never defined.
superdezign wrote:Unless you include reg_process in this file, or reg_process includes this file, this file does not have access to the variables in your reg_process file. Thus, it is never defined.
Thanks mate, I think i did include it, and it works in php4, I don't know what happened with PHP5, since it's a notice message, I CAN still post the message, but I don't know how to get rid off the Notice message, because it messed up my whole design.
As superdezign says, your line setting @title is only set in reg_process.php, which is only called after the form has been submitted. Simplest solution should be to put this line: