1,741 Posted Topics
Re: [QUOTE=RamyMahrous;515614]@erictenson: sorry??[/QUOTE] :) RamyMahrous -> Posting Whiz! Thats what he meant, I guess. | |
Re: [code=php] <html> <head> <script type="text/javascript"> function enableButton() { if(document.getElementById('option').checked){ document.getElementById('edit').disabled=''; } else { document.getElementById('edit').disabled='true'; } } </script> </head> <body onload="enableButton();"> <form method="post" action="test5.php"> <input type="checkbox" name="option" id="option" onclick="javascript:enableButton();">Enable<br> <input type="button" name="button" value="Edit" id="edit"> </form> </body> </html> [/code] Cheers, Naveen | |
Re: Interesting! ;) [quote] Excellent! You made it to Speed Level 4 (out of 5) 58 out of 70 correct [/quote] | |
Re: [QUOTE=jamesbarson;526480]howdy want to be your student am a bigginner[/QUOTE] :confused: Why did you bump a 2 yr old thread ? :| | |
Re: 1. Do you have mysql_connect ? 2. Are you selecting the database ? 3. Does that table exist ? 4. Are you sure the query is correct ? Ie., echo the query and test it in phpmyadmin/mysql console. If your answer is *yes to all*, please post your complete code, … | |
Re: What is the problem ? You would be selecting CourseName and courseID. So, when you post the form, You will have "MATHS" in $_POST['CourseName'] and "101" in $_POST['courseID']. Then it is all about the insert query. Or am I missing something ? :-/ | |
Re: [QUOTE=kishou;518798]ok i cant seem to log in with a regualr password. this code works fine without md5 but it doesnt work when i use md5. yes i've already connected and selected database. $username = mysql_real_escape_string($_POST['username']); //so someone cant sql inject. [CODE]$ = mysql_real_escape_string($_POST['username']); $password = md5($_POST['password']); $result = mysql_query("SELECT * … | |
Re: Try [code=php] <?php ob_start(); ?>[/code] to turn on output buffering (should be the 1st line of your code) and [code=php]<?php ob_flush(); ?>[/code] as the last line to flush the buffered output. | |
Re: Go to mysql console and create a new user either by following [url]http://dev.mysql.com/doc/refman/5.1/en/adding-users.html[/url] OR go to phpmyadmin -> mysql database -> user table. Add a record there filling suitable fields and giving relevant privileges. | |
Re: [QUOTE=NicAx64;825936]I don't think that this is the cluture here. ppl here don't like you using pirate copies or rapidshare pirate downloads. ppl in the different communities are behave very differently so this is not a good community to share them in public. Go somewhere else if you wanna to find … | |
Re: [quote]I tried many ways to do this , first of All I tried to work with Distinct but I figured out that Distinct is applied to a Row not a field[/quote] What do you mean ? [code=mysql] select distinct state from A order by entry_date desc limit 5 [/code] will … | |
Re: This can be done using ajax. I am not really good at Ajax, but, I think, this is what you are trying to achieve. I modified the script from [url]http://w3schools.com/php/php_ajax_suggest.asp[/url] to meet your requirement! This is index.php [code=php] <html> <head> <script src="clienthint.js"></script> </head> <body> <form name="form1"> <input type="button" name="button" value="button" … | |
Re: [code=php] <label>Content: <textarea name="Content" /><?php echo $row['Content'];?></textarea></label><br /> [/code] Pretty simple ? eh ? :) | |
Re: AFAIK, you can do it the other way, ie., assigning a php variable value to a javascript variable. Assigning a javascript variable value to a php variable is not possible since php is a server side scripting language. | |
Re: Yep everything here is outsourced to bloody India. Annoys me a lot because they can never undestand us and always spell my name and address wrong etc.... useless. :( Awww.. | |
Re: [QUOTE=jbennet;926414] Annoys me. Ive learnt through working with such people on projects that a significant percentage dont work well in teams, [B]because thier education system places a very high demand on being *the* number one through your own hard work[/B]. [/QUOTE] You must have worked with the wrong 'set' of … | |
Re: First of all, this isn't the solution. I saw some errors in the script, so, here they are. [quote]$query4=mysql_query("select price from pricelist where item='$result3[item]'"); $result4=mysql_query($query4);[/quote] You have already executed the query and assigning the resource_id of the query to $query4. Then, again, you are trying to execute the query, [icode] … | |
Re: You should escape [b]'[/b] before adding it to the database. Use, [code=php] $link = mysql_real_escape_string($_POST['link']); $sql="INSERT INTO catalog (link) VALUES ('$link')"; [/code] You got that error because, the opening [b] ' [/b] in your query is terminated when it encounters [quote]<a target='[/quote] | |
Re: [url=http://in.php.net/mysql_real_escape_string]mysql_real_escape_string[/url] | |
Re: [QUOTE=bharathi_n_r;502898]Hi there,i have joined newly to this site....I am a new to programming..i am developing a windows application using c#.net..I have the same problem stated by sagedavis but its [COLOR="Green"]windows application[/COLOR]. I have two types of users [COLOR="Red"]Admin[/COLOR] and [COLOR="Red"]Normal [/COLOR]users. I am having one login screen.i want the application … | |
Re: [QUOTE=cartman714;897424]... I am promoting my website... [/QUOTE] All I can say is, OMG Retard. | |
Re: Did you refresh your ftp client ? Anyway, If it isn't giving you any error while creating the directory, it should have created the directory. Do a simple check if it exists. [code=php]if(is_dir($uploaddir)){ echo "Exists!"; } else { echo "Doesn't exist" ; } [/code] | |
Re: Umm.. Are you working on linux by any chance ? Because in linux, the column names are case-sensitive. If you use $list['name'] in your query and you have NAME as a column name, then it would return null ! That might be the problem. Print out $list['category']. There must be … | |
Re: I think you can do it. Check [url=http://www.thewatchmakerproject.com/journal/276/building-a-simple-php-shopping-cart] this [/url] out. Check the working demo at the end of the page. ![]() | |
Re: You can do it this way. [code=php] <?php $con = mysql_connect("localhost","root"); mysql_select_db("test"); //get all the tables from the database test $q = "show tables"; $r = mysql_query($q); $searchresult = array(); while($row = mysql_fetch_array($r)) { $table = $row[0]; // get the tablename $searchtables = "select * from ".$table." where col1 like … | |
Re: [QUOTE=chriswellings;833034]lol i should be dead going by that test but like others here some of the options like tea and soft drink dont apply to me as i dont drink tea and rarely drink soft drink but i gotta slow down on the coffee as i cant even keep count … | |
Re: Huh! database inside another database ? Not possible AFAIK. | |
Re: Instead of [quote] if ($uname != $dbunames) [/quote] You can do, [code=php] if(mysql_num_rows($dbunames) > 0 ) { //check if there is already an entry for that username echo "Already taken"; } else { //insert to table } [/code] | |
Re: [QUOTE=niek_e;857839]I just found out that my link to the 'memberlist' no longer works. So disregard that one.[/QUOTE] I wonder why ! | |
Re: Hi there! I am not sure about the idea of an abstract class or an interface. Here is a simple example of a class with 3 functions, getConnection, closeConnection and insertToTable. getConnection is to connect to the database and closeConnection to close(!). The function insertToTable takes 1 parameter, that is … | |
Re: Print and execute the query in phpmyadmin / mysql console. Check the error message. OR Use [code=php] $rsSelectOnomata=mysql_query("SELECT * FROM titloslimmatos WHERE LimmatikosTypos='$getLima'") or die(mysql_error()); [/code] This will print the error message on failure. This is good for testing purpose (and not in the production environment as it exposes your … | |
Re: [QUOTE=cscgal;872513]Sorry, my test account :) Was trying to see if the problem only affects regular members.[/QUOTE] We had already mentioned this problem [url=http://daniweb.com/forums/thread185648.html] here [/url]. | |
Re: Have an onchange event for the first select box and submit the page. Then use this selected value and query the table and display relevant options in second selectbox. | |
Re: [QUOTE=mani11;874337]how can i access my admin page with edit and delete buttons in (employers/jobseekers form)[/QUOTE] Probably by clicking the correct link. :icon_rolleyes: | |
Re: [quote]aren't you the buddhist monk who gets all teary-eyed when someone talks about eating steak? [/quote] Is it mandatory to make fun of his religion, because as far as I know, He isn't a monk (and Buddhist monks are the most peace loving people I know). | |
Re: [quote] mysql_query() sends a unique query (multiple queries are not supported) to the currently active database on the server that's associated with the specified link_identifier . [/quote] Source: [url]http://in2.php.net/function.mysql-query[/url] | |
Re: Too many errors. 1. [quote] $sql = "SELECT * FROM {$table}" or die("Query to show fields from table failed"); [/quote] Thats wrong. [code=php] $sql = "SELECT * FROM $table"; $result = mysql_query($sql) or die (mysql_error()); [/code] is the right way. 2. You have a typo on line 12. It should … | |
Re: Read this [url=http://www.daniweb.com/forums/thread191031.html]FAQ. [/url] | |
Re: [url=http://in2.php.net/mysql_num_rows]mysql_num_rows [/url] will tell you how many records were returned by the query. | |
Re: Did you print the query and execute it in mysql console or phpmyadmin ? Does that return any records ? If Yes, then it should work in this case too. If No, then you don't have any records in the table. Echo the query and post it here. | |
Re: Yep! Happened to me too when I tried to upload a jpg screenshot. Browser: FF 3.0.8 | |
Re: Works fine for me. Probably, you didn't wait till the page was loaded. | |
Re: [QUOTE=BzzBee;871222]try this [CODE] function dwos($title,$body,$rpcurl,$username,$password,$categories) { $categories=array(); $categories = implode(",", $categories); }[/CODE][/QUOTE] That will not work. You are initializing an array called categories, then imploding the values in the categories (which will be null, ofcourse) and assign it to a normal variable $categories! :S What will that do ? @ … | |
Re: Do you want only mysql or do you also want a webserver (apache) and php with it ? If you want all these, then you can download WAMP. You just have to install the application. It will set up mysql and web server for you ! If you want only … | |
Re: My 2 cents, you can pass an array as the 1st and 2nd argument of str_replace function. [code=php] <?php $search_array = array("”","“"); $replace_string = "_"; //query //while loop $introtext = str_replace($search_array,$replace_string,$mainmenurow['bodytext']); //.... ?> [/code] This is not different from your piece of code. But, both of these should work! | |
Re: [quote] I need to know the difference and the purpose of using an image tag like this <img src="/images/new.jpg>" , <img src="images/new.jpg"> and <img src="../images/new.jpg"> [/quote] Say for example you are in "home" directory. In home directory, there is another directory called "images". You want to display an image called … | |
Re: [quote]Is there any way to get some information about posting ranks?[/quote] Earlier, Daniweb had a memberlist, which you could sort on post count and get all the information about the ranks. But it isn't available anymore as Dani wants to keep this a surprise!!!!! :P |
The End.