1,741 Posted Topics

Member Avatar for mcx76

If you are not sure how to use it, refer this thread. [url]http://www.daniweb.com/forums/thread135884-2.html[/url]

Member Avatar for wulawula
0
108
Member Avatar for veledrom

[QUOTE=Shanti Chepuru;657571]you just give different names to your buttons like: [code=php] <input type="submit" name="b1"> <input type="submit" name="b2"> <input type="submit" name="b3"> [/code] then at the top of your page: do like this: [code=php] <? ob_start(); if($_POST['b1']) { header("location:one.php"); } if($_POST['b2']) { header("location:two.php"); } if($_POST['b3']) { header("location:three.php"); } [/code][/QUOTE] That will just …

Member Avatar for wulawula
0
3K
Member Avatar for max2me99

I am not sure if you can do that using joins. Join returns all the records which matches the condition. So, there is no way to find out which advertiser belongs to which category. [code=php] $query = "select id from category"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { $categoryid = …

Member Avatar for nav33n
0
119
Member Avatar for mustafaneguib

When you post your form to a page, include other php files and process the posted data. ie., page1.php submits to page2.php . in page2.php, include page3.php and page4.php. So, When you post the form data to page2.php , the same values will be accessible in page3.php and page4.php . …

Member Avatar for mustafaneguib
0
114
Member Avatar for justinmyoung

If you are dealing with a string in your query, that is, [code=php] $query = "select * from table where name='test'"; $query = "select * from table where date='2008-01-20'"; //...etc [/code] then you are supposed to use single quotes around them. If you are using an integer, then you don't …

Member Avatar for mustafaneguib
0
231
Member Avatar for wussa

[quote] $db->query("select 1 from t_counter_tmp where id='$code' and email='$email'"); [/quote] select 1 from table ? What does it do ? :-/ I don't think it even enters this loop. What does it ( num_rows() ) do ? [quote] if($db->num_rows()) { [/quote] My suggestion is to have echo and print_r statements …

Member Avatar for nav33n
0
121
Member Avatar for wussa
Member Avatar for The Dude
Member Avatar for Ivan Rutter
Member Avatar for Ivan Rutter
0
381
Member Avatar for psathish2

1. Since you want to compare the values in 2 variables, you should use comparison operator. ie., `if($a == $b)` and not `if($a = $b)`. Thats 1 change. 2. You shouldn't put single quotes around a variable. If you do, php parser will consider it as a string and not …

Member Avatar for peter_budo
0
190
Member Avatar for stan.joe1

[QUOTE=stan.joe1;654060]Thanks Troy III, for taking the time out to look at my script. I’ve made the recommended changes but the problem still persists as it doesn’t prompt the user for the integer an I have no idea how to displays the average, product, smallest and largest of the numbers in …

Member Avatar for Troy III
0
421
Member Avatar for Venom Rush

If you are using linux, you can use cron jobs. I don't have much knowledge on it, so you better do some research on the same ;)

Member Avatar for mexabet
0
123
Member Avatar for ishlux

[QUOTE=ishlux;655175]Hi all what is the syntax of the implode fuction how to use it.....in my application[/QUOTE] php.net is the source for all php functions my friend. :)

Member Avatar for nav33n
0
79
Member Avatar for osman85

I would rather user php's header function. Thats because, if the user has disabled javascript, javascript redirection fails. [code=php] header("location: somepage.php"); [/code]

Member Avatar for nav33n
0
101
Member Avatar for nav33n

Hi all, We have a "reputation bug" this time. When I view my 'reputation' from my control panel (ie., [url]http://www.daniweb.com/forums/usercp.php[/url]) , I see 'up-to-date' reputation (Ref: 1st image). But when I click on "Latest Reputation Received" ([url]http://www.daniweb.com/forums/userrep.php[/url]) , I don't see the last received reputation ! (2nd image) :-/ Where …

Member Avatar for nav33n
0
89
Member Avatar for god_1896

Didn't you post this question already ? Don't double post. Anyway, here is the explanation again. [quote] $string = file('test.php'); [/quote] file() returns an array. [quote] $strings=processFile($string); [/quote] You are passing an array as a parameter to the function processFile. [quote] $lines = file($filename); [/quote] In function processFile, you are …

Member Avatar for nav33n
0
334
Member Avatar for god_1896

[quote] $string = file('test.php'); $strings=processFile($string); [/quote] [url=http://in2.php.net/file] file() [/url]returns an array. So, $string will be an array. You are supposed to send the filename!

Member Avatar for nav33n
0
118
Member Avatar for mansangeet

[QUOTE=mansangeet;654429]need help in php coding !!!!!!!!!!!!!!! not able to send values to database................. hav checked the code many times............ when i apply conditions in my code ...it simply stops sending values to database... plz help.........[/QUOTE] Post your code.

Member Avatar for nav33n
0
77
Member Avatar for lydia21
Member Avatar for R0bb0b
0
116
Member Avatar for lydia21

You can download tinymce editor from the url you have provided. Here is an example how you can use it. [code=php] <?php if(isset($_POST['submit'])) { print_r($_POST); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <script language="javascript" type="text/javascript" src="./tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript"> tinyMCE.init({ mode : "textareas", …

Member Avatar for nav33n
0
297
Member Avatar for saikishore
Member Avatar for saikishore
0
184
Member Avatar for nav33n

Why does it say "Activate your membership to contribute" for closed threads ? See the screenshot to see what I am talking about !

Member Avatar for nav33n
0
76
Member Avatar for phouse512
Member Avatar for phouse512
0
100
Member Avatar for Madawa

If you use print_r for an array, thats how it prints. You can't do much about it. But you can use foreach to use the array as you want it. Example, [code=php] <?php $x = array("teacher"=>"10","student"=>"20"); $y = array("teacher"=>"30","student"=>"40"); $z = array("teacher_no_id"=>$x,"teacher_no_name"=>$y); foreach($z as $key => $value) { $output.="Main array …

Member Avatar for Madawa
0
77
Member Avatar for Keased

[quote] var seconds= <?=$aegs?>; [/quote] Try with double quotes around. ie., [icode] var seconds= "<?=$aegs?>"; [/icode] Do the same with the rest of javascript variables.

Member Avatar for ~s.o.s~
0
84
Member Avatar for jithusdani

[quote] i have wrote a code for file uploader and it was working fine but now its getting sme problems... [/quote] Be specific. What problem exactly ? P.S Please use [code] tags next time you post your code.

Member Avatar for lydia21
0
115
Member Avatar for rejisha

You should use parseInt. [code=javascript] var1=document.getelementbyid('txt1').value; var2=document.getelementbyid('txt2').value; var3=parseInt(var1)+parseInt(var2); alert(var3); [/code]

Member Avatar for ~s.o.s~
0
157
Member Avatar for kevin wood

[quote] mysql_query($sql) or die (mysql_error() mysql_errno()); [/quote] Try this. [code=php] mysql_query($sql) or die (mysql_error(). mysql_errno()); [/code] Notice the concatenation operator [b].[/b] Cheers, Naveen

Member Avatar for nav33n
0
232
Member Avatar for lydia21
Member Avatar for Rakesh Nagekar

Use die with mysql_query. ie., [icode] $result = mysql_query($query) or die (mysql_error()); [/icode] If your query fails, it will 'inform' you why it failed.

Member Avatar for Rakesh Nagekar
0
83
Member Avatar for theimben

Umm.. The AddType will 'inform' php parser to parse files with .gne extension just like a php file. I don't think that will solve your problem. Why don't you use [url=http://in.php.net/rename] rename [/url] to rename your .rar file to .flv ?

Member Avatar for nav33n
0
171
Member Avatar for Vilice

What exactly are you trying to do ? Because, earlier you said, [quote] When I am trying to run a while loop to determine if one of the (many) email addresses inside my "table_1" match any of the email addresses inside my "table_2". [/quote] Now you are saying, [quote] I …

Member Avatar for Vilice
0
114
Member Avatar for R0bb0b

[QUOTE=MidiMagic;650137]I don't use language in the code tags because I don't like the colors it adds. It makes the page harder to read.[/QUOTE] I think its the other way around ! Highlighted syntax is much easier to read. Oh well, everyone has their own likes and dislikes :)

Member Avatar for nav33n
0
147
Member Avatar for asyieen
Member Avatar for Salem

"U can't touch this" should have been "U shouldn't touch this!!!" ;)

Member Avatar for nav33n
0
84
Member Avatar for nedwards

I am not sure. Maybe this could help. [url]http://phpbuilder.com/manual/en/faq.com.php#faq.com.q1[/url]

Member Avatar for nav33n
0
127
Member Avatar for tver3305
Member Avatar for MDGM

Umm.. I tried this script. It worked only for [url]www.yahoo.com[/url] (on both mozilla and firefox). It didn't work for [url]www.microsoft.com[/url] , [url]www.daniweb.com[/url] or even [url]www.whois.net[/url]. :S I think something is wrong with the script. Edit: It worked for [url]www.msn.com[/url] ;)

Member Avatar for MDGM
0
181
Member Avatar for farah_anis

[QUOTE=farah_anis;648895]help me asap!!!>>> please...[/QUOTE] No one will help you unless you mention your problem. :)

Member Avatar for nav33n
0
50
Member Avatar for jithusdani

date is a mysql reserved keyword. Its better if you change the column name "date" to something else. If you don't want to change the column name, use [b]`[/b] around the column name. Oh, btw, if your query isn't still working, print your query and execute it in mysql console/phpmyadmin.

Member Avatar for Shanti C
0
136
Member Avatar for veledrom
Member Avatar for OmniX

[code=php] for($i=0;$i<100000;$i++) { for($j=$i;$j<10000;$j++) { echo "i is ".$i." j is ".$j."<br />"; } } [/code] wouldn't it take as much resource in java as it takes in php to execute the above code ? won't it take 1 byte for int and 2 for a character ? :-/ Just …

Member Avatar for peter_budo
0
107
Member Avatar for jithusdani

Search for pagination in this forum. You will find lots of threads on the same.

Member Avatar for Shanti C
0
74
Member Avatar for OmniX

You can run multiple queries. [code=php] <?php if(isset($_POST['submit'])) { //query 1 //query 2 //query 3 ..... } <html> <body> <form method="post"> <input type="submit" name="submit" value="submit"> </form> </body> </html> [/code] ?

Member Avatar for OmniX
0
261
Member Avatar for ishlux

Eg. test1.php <?php session_start(); $array = array(); for($i=0;$i<5;$i++) { $array[] = $i; //insert $i to an array } $_SESSION['array'] = $array; //assign $array to the session variable $_SESSION['array'] ?> test2.php <?php session_start(); $array = $_SESSION['array']; //assign $_SESSION['array'] to $array foreach($array as $value) { print $value; //print $array contents } P.S. …

Member Avatar for taoteh1221
0
1K
Member Avatar for james1700

Your code looks absolutely fine to me. P.S Check your table. Maybe it is stored that way (premium1 that is) ;)

Member Avatar for nav33n
0
272
Member Avatar for ishlux

Instead of having if-else if-else loop, why don't you assign these values to the dropdown list and then use a single query ?

Member Avatar for nav33n
-1
101
Member Avatar for hijessie

You are taking the checkbox array and inserting it to the database. First, you have to 'collect' the selected checkboxes, because, unchecked checkboxes values aren't posted. To see what you selected, use a for/foreach loop. Eg. [code=php] foreach($_POST['checkboxname'] as $selected_value ) { echo $selected_value."<br />"; //do something } [/code] $selected_value …

Member Avatar for nav33n
0
100
Member Avatar for OmniX

You have something wrong in your query. Echo the query and execute it in phpmyadmin/mysql console. You will see the problem! :)

Member Avatar for nav33n
0
418
Member Avatar for Shanti C

[quote] Notice: Undefined variable: a_img in E:\web\test\photoalbum.php on line 39 [/quote] Either turn off notices or initialize your variables before using them. This way, one can avoid notices.

Member Avatar for tanha
0
527

The End.