Page 1 of 1

project

Posted: Fri Sep 30, 2011 5:44 am
by vijeshkrishna
i am doing a project where a user has to send and receive mails .i am new to php .can i do this using php and have my own domain name like gmail .or should i choose other language ? please help

Re: project

Posted: Fri Sep 30, 2011 2:20 pm
by pickle
I've split this post into it's own project. Please don't try to hijack threads.

Posted: Fri Sep 30, 2011 8:58 pm
by vijeshkrishna
thanks!!!!!!!!!!!!!!

Re: project

Posted: Tue Oct 18, 2011 9:10 pm
by vijeshkrishna
i am developing a project using php and mysql.i need to store the return value in a variable after running the select statement.

Code: Select all

$q = "SELECT name FROM users WHERE u_no='$no'";

						 
						 $r =@mysqli_query ($dbc ,$q); 
						 
						 $num = mysql_num_rows($r);                                  
						 
						 if ($num > 0)
						 {
						 		
								$row=mysql_fetch_array($r);
								


i need to store the returned name value to a variable.please help me out .i am stuck.....

Re: project

Posted: Wed Oct 19, 2011 9:40 am
by pickle
If you have a new question, create a new topic. This will help you get help quicker as the title will be more relevant. It will also help future members when searching with a similar problem.

Re: project

Posted: Thu Oct 20, 2011 9:53 am
by Celauran
vijeshkrishna wrote:i need to store the returned name value to a variable.please help me out .i am stuck.....
Are you expecting only a single result? If so, I'd add LIMIT 1 to your query.

Code: Select all

<?php

$query  = "SELECT name FROM users WHERE u_no = '$no' LIMIT 1";
$result = mysqli_query($query);

if ($result !== FALSE)
{
    list($name) = mysqli_fetch_row($result);
}

?>