545 Posted Topics
Re: $result2 = $conn->query("select * from user where username='".$username."' and passwd = sha1('".$password."')");//forgot password doesn't contain password Firstly person has forgot his password,how will he enter password. It must be $result2 = $conn->query("select * from user where username='".$username."'"); Secondly, **$password** is undefined. after line 17 add this line, $password=$row->passwd;//assuming passwd is … | |
Re: Use the mail function of php. Easy to use. http://php.net/manual/en/function.mail.php | |
Re: Do something like this:- once login is successful store userId in session <?php session_start(); $_SESSION['userId']=$_GET['tid']; ?> And then to get user information use query:- $query_recTenantuser = "SELECT * FROM md_storage WHERE tenantID='".$_SESSION['userId']."'"; $rs_recTenantuser = mysql_query($query_recTenantuser) or die ('Query failed: ' . mysql_error(). "<br />\n $query_recTenantuser"); $recTenantuser = mysql_num_rows($rs_recTenantuser); Rest of … | |
Re: There is no error except that you are not getting Name.So **$row['Name']** is empty. Change the above to this(i am assuming the field "artist name" as "Name" in Database). mysql_query("CREATE VIEW list AS SELECT AlbumId,Title,Name FROM album, LEFT JOIN artist ON album.artistId = artist.ArtistId ORDER BY album.Title")or die ("no dice … | |
Re: finally is always executed (the only exception is System.exit()). You can think of this behavior this way: * An exception is thrown * Print "catch" * Exception is caught and return value is set to 9 * Finally block gets executed.Prints value of a and return value is set to … | |
Re: For String concatenate use "." . If you use +,it considers it as numeric and if it is not a valid number it will return 0. If the start of the string is a valid numeric representation, use that until we come across a character incompatible with that format Otherwise … | |
Re: Look at [this](http://www.daniweb.com/web-development/php/code/351142/simple-but-powerful-paging-function#post1508939) example for pagination. Simple and understandable piece of code. ![]() | |
Re: Even i think that it is not correct to embed mysql.It it is regarding moving application from one system to another,you can use one criteria to create a batch file or something similar and that must execute the setup of mysql and then your java application. | |
Re: @Neha - Have you checked in your DB if the data is inserted or not.If it is not inserted then was there any exception/error. Provide us your code snippets and logs. | |
Re: Kony as for now you must refer php [manual](http://www.php.net) to learn more PHP. If you want to learn programming then start with login page.It itself is a large module in which you have to interact with DB.Maintain session,cookie etc. So for that you may try with online shopping site. ![]() | |
Re: The best way to learn is to go through php manual site http://php.net/manual/en/ It starts with basic php syntax and defines all the functions available in php and its latest happenings. As for IDE is concerned,you can install WAMP server and then use Notepad++ ,lightweight and easy to use.Select just … ![]() | |
Re: what exactly is the problem?? I tried by putting tmz="PST","GMT","PDT","AST" and it is giving me the correct time in required format. Edit: Didn't saw james already posted this | |
Re: I have checked a:visited in IE9,mozilla and chrome.It is working fine in all three.I am not sure what are you talking about <!DOCTYPE html> <html> <head> <title>Test</title> <style> a:visited {text-decoration:underline; color:#ff0000;} /* visited link */ </style> </head> <div id="myDiv"> <ul> <li><a href="#" class="myLink">ABC</a></li> <li><a href="#" class="myLink">DEF</a></li> <li><a href="#" class="myLink">GHI</a></li> <li><a … | |
Re: your question is not clear.What exactly do you want to do ?What error you are getting? | |
Re: please show your code snippet.This is for helping and fixing problem and not for completing your assignments.First show your attempts and then we will help you. As per what i understood,you need to connect your application to database . Then add or subtract it. take a look at JDBC connectivity … | |
Re: **:first** is a selector http://api.jquery.com/first-selector/ take a look at all selectors in javascript http://api.jquery.com/category/selectors/ yes **:hidden** means the divs that are hidden http://api.jquery.com/hidden-selector/ | |
Re: i don't have anymore spring break,wish i could have any, :( | |
Re: <?php echo phpinfo(); ?> type phpinfo() and display the result so that we can know what is your server config. If above code works then it will be sure that php is working in your server and we can check what else might cause this problem. | |
Re: Below is the quote from w3 site http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2 > The content type "application/x-www-form-urlencoded" is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type "multipart/form-data" should be used for submitting forms that contain files, non-ASCII data, and binary data. > > The content "multipart/form-data" … | |
Re: or you can also use javascript:- <script type="text/javascript"> function changeCSS(){ document.getElementById("container").style.height=400; } </script> simialrly you can change other properties of anf element. | |
Re: android cheap,free apps and google trust.What else do anyone want. | |
Re: you can convert date to seconds and add time by converting it into seconds.Similarly for checkout and then just check if current time doesnot lie between the two times in seconds. http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_from-unixtime | |
Re: No.Use must not use inline css.You must prefer separating the two.Create an external css style sheet . An external style sheet is ideal when the style is applied to many pages.Each page must link to the style sheet using the <link> tag. You may use internal css when the style … | |
Re: This question is already asked.Check [this](http://www.daniweb.com/software-development/java/threads/449543/extract-specific-amount-of-numbers-from-for-loop) There are many ways to generate unique random numbers.I am discussing two of them below:- * Write the numbers sequentially in a list structure. Shuffle it. Take the first 'n'. This uses only a single Random instance. * Another option Call Random rand = … | |
Re: 1. there is difference in the name of the file.While calling "M" is capital of autocompletemain.php $("#course").autocomplete("autoCompleteMain.php", { 2. 2nd problem is of the id "**course**" that you are using Instead of "course" ,it should be the id of textbox i.e,"name". Replace this, $("#course").autocomplete("autoCompleteMain.php", { with $("#name").autocomplete("autoCompleteMain.php", { Replace the … | |
Re: there are many ways to do this:- * HTML5 has introduced a very useful attribute "required".If we add this attribute to any control(textbox,textarea...) ,then that field is mandatory. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-required * traditional javascript validation <script> var contact_name_value = document.getElementById('contact_name').value;//# not required.Semi colon missing if(contact_name_value == '') { alert("Please enter a contact … | |
Re: you can do it something like this $result = mysqli_query($con, "SELECT * FROM people WHERE fname='$fName' or lname='$lName' or address='$address'"); if(!$result) { echo "MySQL Error: " . mysqli_error($con) . "\n"; } else { if(mysqli_num_rows($result)==0)//to check if it is returns 0 rows affected { echo "No rows found for this entry"; … | |
Re: you have to use update query. http://dev.mysql.com/doc/refman/5.0/en/update.html So your query will be something liike this, Update sales set year1='344' where Month='January'; I am assuming year1 is the field that you want to update If you want to update it only if it is not null then, Update sales set year1='344' … | |
Re: Instead of explode you can use preg_split here to split on the basis of mutiple delimiters.It will return array. http://php.net/manual/en/function.preg-split.php The first parameter is regular expression and second is data you want to split.In your case it is URL. $urlstring = preg_split( "/([,]|[\/])/", $urlstring ); | |
Re: the 2nd code snippet is wrong as first you are iterating for each items(although iterating is allowed only for arrays and objects) and then for particaular item ,you are inserting it n times . The first code snippet is right.use that one instead of second The correct syntax for foreach … | |
Re: Take a look at dete method of PHP http://php.net/manual/en/function.date.php.You can choose any of the date format.Example of it with textbox showing its value is shown below <?php $date = date("Y/m/d"); echo "<input type='text' value='$date'>"; ?> Edit: Already shown in above post of pixelsoul. | |
Re: Caelan it is not a bug it is the functionality.If you want to get rid of this ,edit your profile http://www.daniweb.com/members/edit_profile and there is option to disable Ads.Just check that box and the Ads will be hidden froum your screen. | |
Re: Refer these sites http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.html http://kb2.adobe.com/cps/713/a7138026.html | |
Re: Check your project properites. What is selected as the startup object? Refer http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/163761f8-cb62-419e-bf12-dab212ab34aa | |
Re: It depends on the duration,data is being updates and relationship between them. As for your case,user personal information will not change a lot,but work data might change,so it is better to seperate the two data in different table and maintain one to one mapping between two tables. | |
Re: > To find out if Gmail can handle the same 10,000 records, Gmail being an application done by a well established corporation like Google, we copied and pasted the same 10,000 records and sent an email. The email was sent to same email account. Time to send email: 44.67 seconds … | |
Re: In line number 2,you forgot to start session. <?php session_start(); if ($_POST['username'] && $_POST['password']) { | |
Re: take a look at mysqli quick start to understand mysqli(The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above. More information about the MySQL Database server can be found at » http://www.mysql.com/) http://www.php.net/manual/en/mysqli.quickstart.php | |
Re: **Import from mysql command line** Two ways to import datase in mysql from .sql file 1. * Open MySQL command line client or execute mysql.exe from command prompt present in MySQL installation path. Create a new database . mysql> Create database test mysql> use test * Then import the database … | |
Re: take a look at http://www.daniweb.com/software-development/python/threads/21762/string-concatenate | |
Re: Instead of function format_html_end($content) { $content = str_replace("</h1></p>", "</h1>", $content); $content = str_replace("</h2></p>", "</h2>", $content); $content = str_replace("</h3></p>", "</h3>", $content); $content = str_replace("</h4></p>", "</h4>", $content); $content = str_replace("</h5></p>", "</h5>", $content); $content = str_replace("</h6></p>", "</h6>", $content); $content = str_replace("</ul></p>", "</ul>", $content); $content = str_replace("</ol></p>", "</ol>", $content); return $content; } why don't … ![]() | |
Re: $sql = "SELECT id, category FROM categories ORDER by category"; this query will return all the categories and corresponding category id.How are you getting only one id? <li><a href="category.php?cat_id=<?php echo $row['id']; ?>"><?php echo $row['category']; ?></a></li> **Close of li tag is missing** This line is used only to create anchor reference … | |
Re: <br/> is an HTML tag that is used to break line that is just user here to display suceeding statements from next line. As for the problem is there for root password,there might be that either you are entering wrong root password or its created. http://dev.mysql.com/doc/refman/5.0/en/adding-users.html There is 1 more … | |
I am receiving such annoying PM from mvmalderen.This must be either through Post in feedback not through PM. If you want to give suggestions give through thread. > Reply to this post as a PM to avoid further thread pollution. > > first of all i don't sit 24 hours … | |
Re: Are you getting any error?Please write the error also what you are getting. You must add die to check if the statement executed and where exactly is the error.Instead of $result = mysqli_query($con, "SELECT fname, lname FROM person"); Use it $result = mysqli_query($con, "SELECT fname, lname FROM person") or die("query … | |
Re: > The idea of inheritance is simple but powerful: When you want to create a new class and there is already a class that includes some of the code that you want, you can derive your new class from the existing class. In doing this, you can reuse the fields … | |
Re: yes you are right stultuske,even similar thing happened to me in that [thread](http://www.daniweb.com/software-development/java/threads/450000/assistance-with-building-a-sports-game-class-that-inherits-from-another#post1947230). the quote i have taken from oracle site and someone disagreed with it and downvoted. even someone downvoted the post in which i have asked for the reason why it is downvoted.check [this](http://www.daniweb.com/software-development/java/threads/450000/assistance-with-building-a-sports-game-class-that-inherits-from-another#post1947563). | |
Re: There are many ways to generate unique random numbers.I am discussing two of them below:- * Write the numbers sequentially in a list structure. * Shuffle it. * Take the first 'n'. * This uses only a single Random instance. Another option Call Random rand = new Random();rand.nextInt(78) and store … |
The End.