1,741 Posted Topics
Re: [quote] but its not doing it [/quote] Which part of the script isn't working ? Executing the delete query or establishing the connection ? | |
Re: When the user clicks apply for the first time, get his username (and password ?) from the table. Add it to the session variable. Then check if the session variable exists. If it does, then don't ask him for username and password. If session variable doesn't exist, ask him for … | |
Re: I dont see an "action" in the html form ! When is your php script getting called ? And why do you have different forms for different form variables ?!? | |
Re: Huh! thats strange. Before foreach loop, assign null to $weekday and then try again ! Edit: Or, use another variablename $weekday1. Check this example. [code=php] <?php echo $id; ?> <html> <body> <form method="post" action='test.php'> <input type=text name=id[]><br> <input type=submit name=submit value=submit> </form> </body> </html> [/code] Form variables are global by … | |
Re: Basically, its like this. You have for example 3 pages. homepage.php, courses.php and students.php. homepage.php is a login script, where the user can login. You should check if the user is a valid user. You shouldn't let the user to go to page2 or page3 (ie., courses.php and students.php) if … | |
Re: Thats because, while inserting, you insert this way. [icode] insert into table (col1) values ('value'); [/icode] But since your value already has a ', its considered as the end of value, throwing an error. If you are using php, you can escape ' or " by using mysql_real_escape_string or addslashes. | |
Re: It depends on how you want to design the page ! You can have checkboxes to select the desired dates. These checkboxes should hold the id of the dates. Then when the user clicks on "Book", it should fetch the date and time from the available_dates (?) table for that … | |
Re: Check this out. [url]http://www.irt.org/script/29.htm[/url] . You can have an onblur event for the textbox and then call the function. You can validate if age < 16 in the function. If true, return false. Else continue. | |
Re: :) Welcome to Daniweb James! [quote](know this i dont use periods all the time unless made to )[/quote] Lol..Why not ? | |
Re: Have another variable which adds $a_row['Total'] value. [code=php] $sum=0; while($a_row= mysql_fetch_assoc($result)) { echo "<tr><td style=\"color:Black\">".$a_row['DayofWeek']."</td>". "<td style=\"color:Black\">".$a_row['Bookingdate']."</td>". "<td style=\"color:red\">".$a_row['Total']."</td></tr>"; $sum=$sum+$a_row['Total']; } [/code] By the end of the loop, $sum will have the total of $a_row['Total']. | |
Re: Check your query. Print it out and execute it in phpmyadmin /mysql. Maybe the query is wrong. And, what is $sql in insert.php ? | |
Re: Start learning php from w3schools ! [url]http://www.w3schools.com/php/php_intro.asp[/url] . You can install [url=http://www.wampserver.com/en/download.php] wamp [/url] or [url=http://www.apachefriends.org/en/xampp.html] xamp [/url]. Its a package which consists of apache, php and mysql. :) | |
Re: Btw, turn on error reporting in php.ini file or put [icode] ini_set("display_errors","on"); error_reporting(E_ALL); [/icode] in your script. This will display any errors in your script. | |
Re: You can ignore notices. If you dont want your script to display notices, you can simply turn the notices off by editing your error_reporting in php.ini file. More on error_reporting [url=http://in2.php.net/error_reporting] here [/url]. And, you can't redirect errors to another page. If you are executing a script and if you … | |
Re: What exactly is the problem ? You can't open the website ? Is the server down ? Call your web hosting company and ask them to solve your problem.. | |
Re: [QUOTE=Suomedia;563898]The problem is quite clear in the error that was generated: [CODE]No database selected[/CODE] Matti Ressler Suomedia[/QUOTE] Do you have mysql_select_db in your script ? | |
Re: As Suomedia has already mentioned, Joomla is easy to setup and use ! | |
Re: See [url]http://www.w3schools.com/htmldom/met_win_open.asp[/url] for popup.. see [url]http://www.w3schools.com/htmldom/prop_win_opener.asp[/url] to update/refresh/relocate the parent window. | |
Re: Everything is correct.. But this is wrong. [quote] $result = mysql_query("SELECT * FROM images WHERE 'Broad1'='$thumb_name'"); { echo $row['Broad1']; echo "<br />"; } ?> [/quote] This should be [code=php] $result = mysql_query("SELECT * FROM images WHERE 'Broad1'='$thumb_name'"); $row= mysql_fetch_array($result); echo $row['Broad1']; echo "<br />"; ?>[/code] | |
Re: Do you have any html tag or any echo statement ? Can you post your code ? |
The End.