1,741 Posted Topics
Re: If you are not sure how to use it, refer this thread. [url]http://www.daniweb.com/forums/thread135884-2.html[/url] | |
Re: [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 … | |
Re: 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 = … | |
Re: 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 . … | |
Re: 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 … | |
Re: [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 … | |
Re: Check if extension=php_zip.dll is commented in php.ini. | |
Re: 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 … | |
Re: [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 … | |
Re: 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 ;) | |
Re: [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. :) | |
Re: 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] | |
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 … | |
Re: 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 … | |
Re: [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! | |
Re: [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. | |
Re: Umm.. what are you guys trying ? Tinymce or fckeditor ? | |
Re: 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", … | |
Re: [url]http://www.codewalkers.com/c/a/GUI-Code/Simple-PHPCAPTCHA/[/url] :) | |
Why does it say "Activate your membership to contribute" for closed threads ? See the screenshot to see what I am talking about ! | |
Re: [url]http://in.php.net/fopen[/url] Check out the different modes. | |
Re: 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 … | |
Re: [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. | |
Re: [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. | |
Re: You should use parseInt. [code=javascript] var1=document.getelementbyid('txt1').value; var2=document.getelementbyid('txt2').value; var3=parseInt(var1)+parseInt(var2); alert(var3); [/code] | |
Re: [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 | |
Re: 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. | |
Re: 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 ? | |
Re: 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 … | |
Re: [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 :) | |
| |
Re: "U can't touch this" should have been "U shouldn't touch this!!!" ;) | |
Re: I am not sure. Maybe this could help. [url]http://phpbuilder.com/manual/en/faq.com.php#faq.com.q1[/url] | |
Re: 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] ;) | |
Re: [QUOTE=farah_anis;648895]help me asap!!!>>> please...[/QUOTE] No one will help you unless you mention your problem. :) | |
Re: 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. | |
Re: [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 … | |
Re: Search for pagination in this forum. You will find lots of threads on the same. | |
Re: 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] ? | |
Re: 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. … | |
Re: Your code looks absolutely fine to me. P.S Check your table. Maybe it is stored that way (premium1 that is) ;) | |
Re: 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 ? | |
Re: 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 … | |
Re: You have something wrong in your query. Echo the query and execute it in phpmyadmin/mysql console. You will see the problem! :) | |
Re: [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. |
The End.