1,741 Posted Topics
Re: huh. Dell users are having alot of problems nowadays! Welcome to Daniweb! | |
Re: [code=php] CREATE TABLE test ( id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , name VARCHAR( 100 ) NOT NULL , address VARCHAR( 100 ) NOT NULL ) ENGINE = InnoDB [/code] If that's my table, and I have a form with 2 fields name and address, this is … | |
Re: You forgot to post index.php. But anyway, here is a suggestion for you. Dont have any html tags, or echo statements (not even a blank space) before calling header function or before starting a session. I guess, in index.php, you are echoing something or you have html tags in it. … | |
Re: I have shown you how to format the array in the way you need(in the other thread). You should try this yourself by analysing the code I gave you earlier. Unless you make an attempt, you wont learn anything. (This is just like the other format. So, I dont see … | |
Re: [code=php] <?php //connect //select db $arrData=array(); $query="SELECT SUM(RAW_AMOUNT) as TotalRawAmount, SUM(FG_AMOUNT) as TotalFGAmount, SUM(WIP) as TotalWIPAmount, UPLOAD_DATE FROM raw_fg_sum GROUP by UPLOAD_DATE"; $result=mysql_query($query); $arrData[0][0] =""; $arrData[1][0] = "TotalRawAmount"; $arrData[2][0] = "TotalFgAmount"; $arrData[3][0] = "TotalWIPAmount"; $i=1; while($row=mysql_fetch_array($result)){ $arrData[0][$i]=$row['UPLOAD_DATE']; $arrData[1][$i]=$row['TotalRawAmount']; $arrData[2][$i]=$row['TotalFgAmount']; $arrData[3][$i]=$row['TotalWIPAmount']; $i++; } print_r($arrData); //$arrData will have the array in the … | |
Re: I would validate on both client side and server side(because sometimes, the user might have disabled the javascript!) | |
Re: [code=mysql] select * from reviewtable where reviewdate >= date_sub(NOW(), INTERVAL 24 HOUR) order by productrating desc [/code] I think this should work. I am selecting only those records where reviewdate is greater than (present-time - 24 hours). P.S. I haven't tested it. But I think it will work. | |
Re: The problem is with the file db.php . When you are using header() function, you shouldn't output anything to the browser. ie., you shouldn't echo anything before header function. You shouldn't even have html tags. Check your db.php. Cheers, Nav | |
Re: [code=php] <?php if(isset($_POST['submit'])) { if($_FILES['fileupload']['name']==""){ echo "Empty"; //no file was uploaded } //continue with rest of the operation.. } ?> <html> <body> <form name="upload" method="post" action="upload.php" enctype="multipart/form-data"> <table> <tr><td> <input type="file" name="fileupload"> </td></tr> <tr><td> <input type="submit" name="submit"> </td></tr> </table> </form> </body> </html> [/code] This will do.. :) | |
Re: And put commas. :) Edit: I didn't see shawnCplus edit his post! | |
Re: Yes, you can. But make sure you are connecting to the database before executing any query. | |
Re: Welcome to Daniweb! Can you show us your script so that we can make out where you are going wrong ? | |
Re: In mysql, we dont have adVarChar! Its either char, varchar or text. | |
Re: Simple. You do it this way. [code=php] <?php ..... if($row_rsFrontPage['ImagePath']=="") { $class="noclass"; } else { $class="applyclass"; } ?> <p class="<?php echo $class; ?>">blah blah blah... </p> [/code] Hope that helps. Naveen | |
Re: Umm.. You can have 3 tables. One to store all the registration information. Second to store the login information and third, to store the path of the files for every user. In registration table, you can have firstname, lastname, loginname, password, confirmpassword, email, blah blah blah. This will only be … | |
Re: [QUOTE] So i have about 300 students that all need to be placed in option statements (html). I need these names then put into a drop down menu for students to choose. [/quote] If you have these 300 students info in a table, then just fetch their info by using … | |
Re: umm.. You need to post your question [url=http://www.daniweb.com/forums/forum51.html] here[/url]. Welcome to Daniweb btw! | |
Re: Welcome to Daniweb alcont. You should have started a new thread :) | |
Re: Wow! interesting. Welcome to Daniweb Vanguns! | |
Re: [url]http://www.devarticles.com/c/a/PHP/Use-PHP-to-Create-Dynamic-pdf-Files/[/url] | |
Re: lol.. Xsimulator.net, What did you have (heroine/coke/weed/?!?), while starting this thread ? | |
Re: [code=mysql]SELECT eid, title, SUBSTRING(content, 1, 200), thumb_image FROM diary ORDER BY eid DESC LIMIT 3 [/code] :) Now, gimme my virtual high five! | |
Re: Umm.. I am not sure about preg_replace. But you can do the same with str_replace! [code=php] <?php $txt="' is a single quote \" is a double quote.I want to replace ' with ' and \" with \" "; echo "Actual text: " .$txt."<br />"; $x=str_replace('"','\"',str_replace("'","'",$txt)); echo "Replaced text: ". $x; … | |
Re: You should [url=http://www.w3schools.com/flash/flash_inhtml.asp] embed [/url] your flash file in your html page. | |
Re: Say, for example, the user enters 10 in the first screen. On the next screen, you can do something like, [code=php] $textboxes_number=$_POST['number']; //the number of textboxes the user wants $textboxes_number=10; //say user enters 10 in the previous screen echo "<form name=form method=post action=somepage.php>"; for($i=0;$i<$textboxes_number;$i++){ echo "<input type='text' name=txt$i>"; } echo … | |
Re: [QUOTE=Xsimulator.net;510222]y[/QUOTE] :S Dude! is everything ok ? This is the 2nd time you are saying something which doesn't make any sense. |
The End.