345 Posted Topics
Re: [QUOTE=ardav;1113897]I'm not an expert, just a hobbyist.[/QUOTE] dont believe him... hes just too humble to admit it.hes an expert in PHP... you hear me... E.X.P.E.R.T.....your soooo lucky ardav help you.... hes the most knowledgable guy i know here in PHP. | |
Re: is it true daniweb is from india? my friend told me that? though im not an indian, im a big fan of indian programmer like Pranav Mistry. I hope it's ok to ask here. pardon my ignorance. | |
Re: use mysql distinct query, to query distinct rows. | |
Re: [CODE]<?php echo $images[rand(0,count($images)-1)]; ?>[/CODE] | |
Re: you had syntax error on your query [QUOTE]SELECT * FROM table ORDER BY RAND(), LIMIT 1[/QUOTE] erase the comma next to RAND(), it should look something like this [QUOTE]SELECT * FROM table ORDER BY RAND() LIMIT 1[/QUOTE] | |
Re: [CODE]<?php $input=56; // your input here, ex. 56 $credit=76; if($input<$credit){ $dif = $credit-$input; } echo $dif; ?>[/CODE] | |
Re: I recommend codeigniter. It's easy to use and install. | |
Is't really true that december 21, 2012 is the end of the world? they say the signs are clear. changing climate, frequent disaster. There is even a rumor that the government has found a new planet that can support life that rich people specially the government officials secretly built spaceships … | |
Re: i recommend you use javascript redirect [CODE]echo "<script>window.location='form2.php'</script>";[/CODE] to avoid annoying error on php header() function, about already sent output. regards on how you will know if the 2nd form is successfully and correctly filled up. you can add a field in your database table where you store your record. … | |
Re: ei dude theres no function or whatsoever that automatically change it's context language... its a tough job... u had to manually code it to translate every context on different language... you can save the data into the database and query them upon changing the language setting. | |
Re: <table> <tr onclick='alert(document.getElementById("row1").innerHTML)'><td id='row1'>your_text</td></tr> </table> | |
Re: where is your ending tag of form? </form> | |
Re: [QUOTE=ardav;1109536]Does it have to be a single image? A table could [I]arrange[/I] them. A graphics package with stitch them together. If you've got an underlying grid- this is a snip. Just upload the image. If you want to do this dynamically, have a look at the GD2 graphics library. It … | |
Re: add a DOC type declaration. ![]() | |
Re: use session if you want a certain value to propagate throughout the page. Like user id. Session are are usually used to store id of user so that the system can track and identify the user accessing the page. | |
Re: put an event to your anchor link ex. lets put a javascript onclick event on your anchor tag [CODE]<html> <head> <script> function do_your_thing(){ //put want you want to happen here, ex. an alert script alert('End of the World!'); } </script> </head> <body> <a href='#' onclick='do_your_thing()'>click me</a> </body> </html>[/CODE] | |
Re: [QUOTE=Chosen13;1109403]I fixed it nevermind.[/QUOTE] hmm.. something fishy... | |
Re: i dont understand the problem? why do you want to compare the 2 col if theyre equal? when you can just do that before you start storing it to the database. | |
Re: [CODE]isset($_POST['username'] && $_POST['password'])[/CODE] i didn't know you can set conditional inside isset() function havent tried it yet. and other than that i spotted you lack the closing brace of your if() statement. other than that seem fine to me. [CODE]if (isset($_POST['username'] && $_POST['password']) ) { if ($_POST['username'] == 'admin' || … | |
Re: this is a very funny thread. specially the PHP definition from samarudge. lol | |
Re: changed upload_max_filesize in php.ini, saved changes then restart server. | |
Re: [QUOTE=prashesh;1107949]It is called [B]redirect[/B], not a [B]new window[/B], please read the thred above carefully, before giving any answer/example. Thanks[/QUOTE] wow your scolding a MODERATOR? what a brave thing | |
![]() | Re: your form 2 is like this [CODE]<form action="report.php?act=view" method="post" name="textform" class="style16">[/CODE] so you should changed this code [CODE] if ($action == viewrep)[/CODE] to [CODE]if ($action == 'view')[/CODE] |
Re: hey takeshi just change line 50 from [CODE] echo '<td><center><td>'<input type='checkbox' name='position' >'</tr></td>'. $row['position'] . '</td>';[/CODE] to [CODE] echo "<td><center><td><input type='checkbox' name='position[]' value='".$row['id']."' ></tr></td>". $row['position'] . "</td>";[/CODE] the problem there is you forgot to set name to an array, position[], and try to use qoutes properly. | |
Re: is this solved? OMG! im too late! yeah will is right? i recommend use session, it's the best approach to your problem. | |
Re: PHP - server-side programming MySQL - database the link there is you can do programming with database. | |
Re: this is an interesting thread... im also curios if you there is a way on solving that problem coz. the back button is specially made for that... for viewing your previously viewed page. i dont know if there's really a code for that.. i dont know... maybe? | |
Re: yezzz its very clear that baidu is afraid of the new search engine to hit their country. So they plan a demolition job. @sodabread: of course they will get a higher market, It would be a shame if google has high market over baidu having them 1st over google china … | |
Re: that error only means that you specify an incorrect path to PHP function include() or the file you wish to include does not exist. | |
Re: can you show us your start code? so we can add up the functionalities you want. | |
Re: tried and tested. <?php foreach($_GET['chk'] as $val){ $x++; } foreach($_GET['chk'] as $val){ $y++; if($y<$x){ echo $val.","; }else{ echo $val; } } ?> please mark this solved, if you think we solved it... thanks | |
Re: why not use forearch() instead of your while(list($key,$ars)=each($ar))??? you like complicated stuff? it think your image folder contains 4 images, coz the end of your loop depends on your $ar=scandir("hairupdo"); which is the location of the images. | |
Re: yezzz manish and almostbob are correct. i recommend you use notepad++ as your editor, beside the coloring capability, notepad++ detects the start and ending tags and braces/blocks which is very cool and helpful. | |
Re: use css, put an inline style rule, add style attribute on body tag. [CODE]style="background-image:url('image.jpg')"[/CODE] | |
Re: yezz i check your code and i didnt find anything wrong there... try revising the code like this. [CODE]<?php echo "<a href='http://somewhere/pg2.php?row1=".$row1[0]."'>CLICK ME!</a>"; ?> [/CODE] | |
Re: you need a wysiwyg editor. i only know 2 examples of this editor. fckeditor and tinymce. they are freeware so you can download them for free. | |
Re: ok takeshi you know the drill replace database table that suites your needs. Tried and tested [CODE]<?php mysql_connect('localhost','root',''); mysql_select_db('joe'); ?> <?php if(isset($_GET['btndelete'])){ $account = $_GET['account']; if(isset($account)){ foreach($account as $val){ mysql_query( "DELETE FROM account WHERE account_id='".$val."'" ); } } } ?> <html> <head> <title> confirm </title> <script> function deleterec(){ if(confirm("Are you … | |
Re: you mean want to change your dropdown without without refreshing the page? then use AJAX ![]() | |
Re: you want to add the location on the database? then just insert your $dest variable into your database. assuming you had these table and variables you query should look like this INSERT INTO your_table(name,date,location) VALUES('$name','$date','$dest'); | |
Re: hehe that code is familiar... ill help you takeshi when you still got problems.... when i get home and after i had my 8 hour sleep. coz im working now and i can't do that right now hehe. | |
Re: [QUOTE=harshbavaliya;1103079]just use "POST" instead of "post". post must be in capitals... and yeah one more mistake you have done in this code is, you have set action="", it means that form will not save that value. [/QUOTE] what the hell are you talking about dude? do u know how code … | |
Re: your code is a mess... arrange it neatly. [CODE]<?php session_start(); if (!$_SESSION["valid_user"]) { // User not logged in, redirect to login page Header("Location: login.php"); } // Member only content // ... // ... // ... // Display Member information echo "User ID: " . $_SESSION["valid_id"]; echo "Username: " . $_SESSION["valid_user"]; … | |
Re: religion vs. science magic vs. technology were like water and oil... they stay together but they don't mix. | |
Re: u dont need php script just to retrieve records... all you have to do is go to phpmyadmin and then export database and a sampledatabase.sql will be given to you. dont worry... its not a big file... it's just a plain text... | |
Re: you have to use the 'like' function of mysql... seet this link for a much detailed info. [url]http://w3schools.com/sql/sql_like.asp[/url] |
The End.