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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Being a new user of PHP I am just playing around and testing some stuff, so I appologize if my problems seem trivial.
In the code below I am trying to assign a Variable called $Test and then have the contents of the variable be placed on the Submit Button. I have tried many different variations and can't seem to get it to work as I always get $Test as the text on the button. Could someone explain to me the proper way to accomplish having the contents of the variable show on the button. I would appreciate if someone could modify the code below to show me how it is done.
Thanks very much for any information.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to just expand on my testing a bit and it seems I am lost again.
In the following if I don't fill anything in the form and click the submit button then the page refreshes but I don't see and error message.
Am I correct in thinking the first time through the form the isset should be false, then if I leave the form blank press the submit button and the form refreshes I should see a red error message on the display because the isset should be true.
I can see this is going to be a long education at this rate.
Thanks for any help.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Wel I am totally confused now. So I changed my little test php to relect the information being received from here. Now I have a problem that is really throwing me for a loop.
So in my first test I named the submit button as submit_button and I have changed it to a new value of just 'submit'. Ok, so I figure all should be good and things should start to work. I replaced the php file and tested again.
Well if I look at the source of what the browser is receiving it is still getting the submit_button name and not the submit name. If I hit the submit button showing on the screen without filling any data into the fields then the new version shows upin the browser. Then if I hit the submit button again the script works.
So my confusion is why is the browser still getting the first version and how to I make sure the most current version is always used.
I appologize for these trivial questions and problems and I am sure once I get over this darn hump on basic understanding then I should be better, but for right now I am really confused.
Thanks
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]