812 Posted Topics
Re: When you click refresh the form data gets resubmited. What you should do is check in the backend system (i.e a database) wheter submited account already exists. | |
Re: The difference between exmples is: The former is using object oriented programming aproach. $DB is an object and Query() is a method of that object. The later is classical procedural approach where mysql_query() is a function. Both do similar task I guess. You in general decide wheter to use object … ![]() | |
Re: In my opinion w3schools is an excelent resource but stays on a basic level. It is good idea to check how same things are done on php.net, sometimes in examples or comments sections you can find very useful stuff. I also used a book PHP6 and MySql Bible published by … | |
Re: Can you state in plain english what is the condition you want to check? | |
Re: EDIT: Sory, missed the heredoc tag. Both are correct. It is just a question of style. Either write html tags like in former case or echo them lake in later. ignore my statement below [I]The former is the correct way. Between the <?php and ?> tags only valid PHP sysntax … | |
Re: What is the full path to your script and the full path to your Classes directory? If Classes is in your script's directory then remove slash before the Classes path.If Classes is somewhere else then set the include path(s) in php.ini so it(they) point(s) to where Classes and other include … | |
Re: Your form has form elements with the same name in each row so $_POST array contains only the last set of values I guess. Try to enclose form elements that belong to one row in <form></form> tags (so each form has only one submit button). | |
Re: It seems to me that you are trying to run the script from the command line instead of displaying it in a browser. In general with PHP you can make two types of scripts: - applications which are run from command line (php scriptname.php) - and scripts which are processed … | |
Re: If you display contents in a table define two CSS classes for row background color - one for even rows and one for odd rows. [CODE].tr_even {background_color: gray;} .tr_odd {background_color: white;}[/CODE] Then check the row number and use code: [CODE]($row_No % 2) ? echo '<tr class="tr_odd">' : echo '<tr class="tr_even">[/CODE] | |
Re: Session can not be initiated since HTTP headers have already been sent. The thing is that session sets a cookie which is sent as a header directive. All headers HAVE TO be sent before and only before any content is sent (this is the requirement of the HTTP protocol not … | |
Re: For PHP file to run in the browser you have to have a running web server on the machine. I use Fedora and Apache (and Mysql as a database). So check if you have some sort of web server (i.e. Apache or LAMP) installed and started. You can install a … | |
Re: Heredoc syntax is a way to use custom identifier to delimit strings in PHP. Usualy string are delimited with single or double quotes, but with heredoc you declare (name) an identifier. This way you do not have to escape single and double quotes anymore. Te rules for chosing identifier name … |
The End.