1,741 Posted Topics
Re: @ doesn't help it error handling, but it supresses the errors. [code=php] if(@mysql_num_rows($result) > 0){ //do something [/code] This above code, supresses the warning if there is something wrong with the query. Its not a good practice to have @, because it makes your life very difficult to know where … | |
Re: [QUOTE=nireekshan;569373]hello i am using Mysql plse send DataBase Connection and ROOt[/QUOTE] The default user for mysql is root. Database connection can be established by using mysql_connect. You should be specific in the questions you ask and post your question in related forum ! :) | |
Re: As far as I can see, there isn't much of a difference. I noticed a negligible amount of delay few hours ago. (Umm.. maybe because I am used to slow speed internet.) [quote]Secondly, to be able to afford to keep Davey, and other staff writers, on the payroll to deliver … | |
Re: Print out your query, execute it in phpmyadmin/ mysql console and see if it works. You can also give "die" to check if your query is working or not. ie., [code=php] $query = mysql_query("your query") or die(mysql_error())"; [/code] | |
Re: Wrong forum christico80. Post your question in [url=http://www.daniweb.com/forums/forum7.html] hardware [/url] forum. Welcome to Daniweb btw! | |
Re: I always checked out SAMS publications for 'quick learning' ! | |
Re: Yes. You can do it without using ajax. This is how it is. You populate one select box from the table. Then have an onchange event, which submits the page when an option is selected. Then get the posted selectbox value and populate the 2nd selectbox. | |
Re: It is possible. But you can do it this way. [code=php] <script type='text/javascript'> alert(<?php echo $_SESSION['un']; ?>); </script> [/code] If that doesn't work, try, [icode] alert('<?php echo $_SESSION['un']; ?>'); [/icode] Cheers, Naveen | |
Re: [quote]General idea is... I click a button, goes through php code, opens a new page and then refresh orginal page.[/quote] You mean the 'new page' is a popup and 'original page' is the parent window ? | |
| |
Re: You can use [url=http://nl3.php.net/manual/en/function.is-int.php] is_int [/url] Eg. [code=php] if(is_int($letter2)){ $letter3="#"; } else { $letter3=$letter2; } [/code] | |
Re: [icode]<input type="text" name="username" value="<?php echo $_POST['username']; ?>"> [/icode] | |
Re: If it was successful in connecting, why would it say access denied ? | |
Re: Simple. Add a href for each department with department_id. ie., [code=php] while(get_all_records){ echo '<a href="department_details.php?id=id_of_the_department> departmentname</a>'; //lists all the departments } [/code] In department_details.php, get the id, fetch its details from the table. [code=php] $id = $_GET['id']; $query = "select * from department where id='$id'"; //execute it and get the … | |
Re: [url]http://www.codeave.com/javascript/code.asp?u_log=7062[/url] | |
Re: I guess you have php version 5+ ? Check this out to make php work with apache. [url]http://www.expertsrt.com/tutorials/Matt/install-apache.html[/url] or you can try wamp, which is a package of apache, mysql and php. | |
Re: Web application or windows application ? I have never done any windows application, but [url=http://winbinder.org/] WinBinder [/url] is the tool.. | |
Re: And you need to be specific in your question. 'Give me idea' put us in alot of doubt :) | |
Re: You dont need <?= because you are already echoing something ! You can do this. [code=php]echo "<form name=\"tsgh_add\" method=\"post\" action=".$_SERVER['PHP_SELF']." onSubmit=\"return checkWholeForm(this);\">"; [/code] | |
Re: When you submit the form, see what is getting posted. I think the checkboxes aren't storing any values ! when you submit the form, add print_r($_POST); in the script which process the form variables. | |
Re: [icode]echo "<script>window.print()</script>"; [/icode] You can see an example of window.print() here.[url]http://www.w3schools.com/htmldom/met_win_print.asp[/url] | |
Re: Check for connection string in your script. Its unable to connect. [icode]$connection =mysql_connect("host","user","password") or die (mysql_error()); [/icode] Will give you the correct error message. | |
Re: if(isset($_GET['id']) == TRUE) { Brace is not closed for that condition. One suggestion, Indent your code. You can easily find these kinda errors. Cheers, Naveen | |
Re: [quote]1a.) How do I display online members? [/quote] Have a column(online) in your table and set it to 1 whenever the user logs in. Then list only those users who are online. [code=php] $q="select * from table where online=1"; [/code] [quote]b.) How do I sort the online members by location?[/quote] … | |
Re: What do you mean 'is not working' ? What error are you getting ? | |
Re: Open the textfile, read it, display the read contents using html tags. Maybe you can find 'text to html conversion class' in sourceforge. | |
Re: You can use array_multisort. More on array_multisort [url=http://nl3.php.net/function.array-multisort] here [/url]. | |
Re: When the form is submitted, get the value of the select box. $selectboxvalue = $_POST['x_visittype']; Then update the table depending upon the value of $selectboxvalue ! | |
Re: Explode the value on +. Then add the required fields. Eg. [code=php] $value1 = $_POST['field1']; //consider $value1 has 100+xyz $value2 = $_POST['field2']; //$value2 = 300+abc $newval1 = explode("+",$value1); $newval2 = explode("+",$value2); //$newval1 and $newval2 will be an array where $newval1[0] will have 100, $newval1[1] will have xyz and $newval2[0] will … | |
![]() | |
The End.