1,741 Posted Topics

Member Avatar for kusal

@ 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 …

Member Avatar for kusal
0
91
Member Avatar for nireekshan

[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 ! :)

Member Avatar for peter_budo
0
111
Member Avatar for Dani

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 …

Member Avatar for Dani
0
187
Member Avatar for justted

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]

Member Avatar for RoryGren
0
189
Member Avatar for Christico80

Wrong forum christico80. Post your question in [url=http://www.daniweb.com/forums/forum7.html] hardware [/url] forum. Welcome to Daniweb btw!

Member Avatar for jbennet
0
74
Member Avatar for Christico80
Member Avatar for peter_budo
Member Avatar for kevin wood
0
82
Member Avatar for kusal

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.

Member Avatar for kusal
0
89
Member Avatar for lydia21

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

Member Avatar for nav33n
0
242
Member Avatar for OmniX

[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 ?

Member Avatar for OmniX
0
90
Member Avatar for TnWbDzgnr1996
Member Avatar for BstrucT
Member Avatar for Lingamurthy
Member Avatar for homonoki

Welcome to Daniweb homonoki :) ! I hope you aren't lost anymore!

Member Avatar for zandiago
0
50
Member Avatar for lancelot_69
Member Avatar for zmobedlam
Member Avatar for xa2009
Member Avatar for Igor_Munster
Member Avatar for Nessie
Member Avatar for Bunty1
Member Avatar for BartKobMan
Member Avatar for Scottmandoo

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]

Member Avatar for Scottmandoo
0
129
Member Avatar for ujwalkhairnar25
Member Avatar for nav33n
0
161
Member Avatar for kevin wood
Member Avatar for RoryGren
0
113
Member Avatar for BenWill

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 …

Member Avatar for nav33n
0
130
Member Avatar for sukhy_1
Member Avatar for nav33n
0
143
Member Avatar for maxmannuk

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.

Member Avatar for nav33n
0
40
Member Avatar for mrcniceguy
Member Avatar for nav33n
0
45
Member Avatar for kv79

Web application or windows application ? I have never done any windows application, but [url=http://winbinder.org/] WinBinder [/url] is the tool..

Member Avatar for nav33n
0
117
Member Avatar for avmaza

And you need to be specific in your question. 'Give me idea' put us in alot of doubt :)

Member Avatar for nav33n
0
107
Member Avatar for Venom Rush

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]

Member Avatar for nav33n
0
90
Member Avatar for sukhy_1

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.

Member Avatar for nav33n
0
168
Member Avatar for dbayo

[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]

Member Avatar for nav33n
0
51
Member Avatar for justinmyoung

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.

Member Avatar for nav33n
0
119
Member Avatar for justinmyoung

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

Member Avatar for nav33n
0
103
Member Avatar for flynismo

[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] …

Member Avatar for nav33n
0
96
Member Avatar for jobykjoseph
Member Avatar for jobykjoseph
0
147
Member Avatar for lydia21

Open the textfile, read it, display the read contents using html tags. Maybe you can find 'text to html conversion class' in sourceforge.

Member Avatar for nav33n
0
65
Member Avatar for bhakti.thakkar

You can use array_multisort. More on array_multisort [url=http://nl3.php.net/function.array-multisort] here [/url].

Member Avatar for nav33n
0
92
Member Avatar for juvincy

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 !

Member Avatar for nav33n
0
64
Member Avatar for jjasoningram

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 …

Member Avatar for nav33n
0
67
Member Avatar for dorilys
Member Avatar for babs02
Member Avatar for sodium1
Member Avatar for JohNNy426
Member Avatar for TruJoys
Member Avatar for Kobussie
Member Avatar for CaribbeanOSX
Member Avatar for Tai-Pan
Member Avatar for jeffb51

The End.