Shanti C 106 Posting Virtuoso

hello..
i mean echo $filename; means check that image path for your current working directory...

Shanti C 106 Posting Virtuoso

going to learn about implode and explode functions clearly...and also coding.....

Shanti C 106 Posting Virtuoso

Do something to get great thing,Because something you have......

Shanti C 106 Posting Virtuoso

post your updated code...

Shanti C 106 Posting Virtuoso

<?php echo "<img src='/images/". $filename ."'>" ?>

in this line the / before the images,Is is must???i think no..
And also make sure that is correct path of your current folder to images folder...
or echo $filename; check it with correct path of stored image..
or post your appropriate code..
i will check it..

Shanti C 106 Posting Virtuoso

Doing shopping cart with sessions is best way to load our site fastly than storing them into a database table..But its must to store ordered data finally in database table for future reference of orders ,order user details and status of order...
In my way, i hope the best method is-
creating one session array for one user session and storing all the data like product_id,price,quantity,user details etc ..And update that session array between that user shopping navigations..and finally storing the session data into a table...
if this is not your requirement..let me know...

Shanti C 106 Posting Virtuoso

A programmer , who is coding the particular job ,which already designed. A developer developes the whole thing from analysing, then designing,code it and then test the same.

R0bb0b commented: That's a good definition +2
Shanti C 106 Posting Virtuoso

For instance, a user selects American Bantam and the years 1936, 1937... 1940, 1941 are listed.

If user selects name, then based on that id you can get two dates from your database table, then make a dropdown list by incrementing the first date, put if condition greater than end date...
try it...
or post appropriate code...then we can see it for validate....

Shanti C 106 Posting Virtuoso

why not communities .....

Shanti C 106 Posting Virtuoso

Form where $result_row comes from???
i thinks its $rowsql...
i hope so....check it...

Shanti C 106 Posting Virtuoso

i tried your code ...
i didn't get that error...its work fine...
check again..

Shanti C 106 Posting Virtuoso

hello check this attachment below..
go through your database....

Shanti C 106 Posting Virtuoso

see this:

$variable="a";
$sql = "select * from characters where letters like '%".$variable."%'";
Shanti C 106 Posting Virtuoso

A child on a farm sees a plane fly by overhead and dreams of a far way place....
A traveler on the plane sees the farm and dreams of home....that life...

Shanti C 106 Posting Virtuoso

hello try this:

$sql = "select * from characters where letters like '%a%'";
$query = mysql_query($sql);
$count=mysql_num_rows($query);
echo $count;
Shanti C 106 Posting Virtuoso

story is very

Shanti C 106 Posting Virtuoso

you just install joomla from joomla.org and read tutorials which are available at internet...

Shanti C 106 Posting Virtuoso

Hello alll...
today i learned difference between using css or table based..as i know some information on this...i just knew more points by this thread:
http://www.daniweb.com/forums/thread150866.html
and also
http://www.templatesfactory.net/articles/css-vs-table-based-design.html

Shanti C 106 Posting Virtuoso

Adding to David_ ...
i added some more points here...
this link will give more points on this...
http://www.chromaticsites.com/web-design-blog/2008-04-03/13-reasons-why-css-is-superior-to-tables-in-website-design/

Shanti C 106 Posting Virtuoso

hello mrcniceguy ..
i have checked your code...
i think you just end your if condition brace at that line only...
means like..

if(isset($_GET['userid']))
{
$userid=$_GET['userid'];
}

other wise it will take that userid again and it will fetch and it will display first image...
try this way..you will definatly get your requirement..

Shanti C 106 Posting Virtuoso

yes , try PoA way like:

$seq="select count(*) as cnt fromdata_table WHERE page='$page'";
	$sres=mysql_query($seq);
$srow=mysql_fetch_assoc($sres);	
	
	if($srow['cnt']>7) {
	
		//do something}
else if($srow['cnt']<=7)
	{
//do another thing	
	}
Shanti C 106 Posting Virtuoso

or check for main fields of that post form...then i can be prevented...
for example...

$seq="select count(*) as cnt from tablename where username='".$_POST['username']."'";
sres=mysql_query($seq);
	$srow=mysql_fetch_assoc($sres);	
	
	if($srow['cnt']>0) {
	
		$errmsg="User with this Username already existed.";
		
	} else 
{
//do your insert operations..
}

and for empty fields doing client side validation is better...

Shanti C 106 Posting Virtuoso

Thought for life time:::
The most time you will have to spend in your life is with yourself...So make yourself as interesting as possible....
Have A Great Day for all Daniweb Family Members...

Shanti C 106 Posting Virtuoso

i think no difference between them....

Shanti C 106 Posting Virtuoso

Any information on this???

Shanti C 106 Posting Virtuoso

session_register() registers the global variable with that name in the current session.

- is my assumption correct that every checkbox checked is added to the array only?

yes...only the checked ones are added to that array..
you have to read more about sessions here

Shanti C 106 Posting Virtuoso

get report id from where ever you display the view in your page...

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

HELLO all...
Good Afternoon!!!!

Currently i am developing a website...In that website i want to ad management ,where we can add and manage different ads with different prices, in different place on our website with time and etc...

Any body have any scripts or any ideas to develop this kind...
or any open source scripts available ...
Please Let Me know..

Thank you,
Shanti.

Shanti C 106 Posting Virtuoso

today i learned that thinking :-/ is such a waste of time because it took 2 hours to me thinking what to do next after watching ajax tutorials videos

Some times thinking will result in good ideas even they took more time...
And start practice on ajax programming..Its very interesting..
Go ahead my dear kid....

Shanti C 106 Posting Virtuoso

today i learned and wrote myself with little piece of code upon practicing the session arrays...
here my little code goes:

<?
session_start();
 if($_SERVER['REQUEST_METHOD']=='POST')
{
foreach($_POST['checkbox'] as $key=>$val){
  echo "key: ". $key. " value: ". $val ."<br />\n";
  session_register(); 
  //$_SESSION['checked'] = array();
  
 
}
$_SESSION['checked']=$_POST['checkbox'];
 foreach ($_SESSION['checked'] as $key=>$value) {
     echo 'The value of $_SESSION['."'".$key."'".'] is '."'".$value."'".' <br />';

     }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form action="" method="post" name="form1">
<table width="100%" border="0">
  <tr>
    <td><input type="checkbox" name="checkbox[]" value="1">
<input type="checkbox" name="checkbox[]" value="2">
<input type="checkbox" name="checkbox[]" value="3">
<input type="checkbox" name="checkbox[]" value="4">
<input type="checkbox" name="checkbox[]" value="5">&nbsp;</td>
  </tr>
  <tr>
    <td><input type="submit" name="button" value="GO!">
</td>
  </tr>
</table>
</form>
</body>
</html>
Shanti C 106 Posting Virtuoso

just had tasty indian lunch...

Shanti C 106 Posting Virtuoso

There is no wrong time to do a right thing!!!!

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

see this code...it will print only clicked checkboxes..

foreach($_POST['checkbox'] as $key=>$val){
  echo "key: ". $key. " value: ". $val ."<br />\n";
  echo $_POST['checkbox'][0];

and this is for storing in sessions:

session_start();
 if($_SERVER['REQUEST_METHOD']=='POST')
{
foreach($_POST['checkbox'] as $key=>$val){
  echo "key: ". $key. " value: ". $val ."<br />\n";
  session_register(); 
  //$_SESSION['checked'] = array();
  
 
}
$_SESSION['checked']=$_POST['checkbox'];
 foreach ($_SESSION['checked'] as $key=>$value) {
     echo 'The value of $_SESSION['."'".$key."'".'] is '."'".$value."'".' <br />';

     }
}
OmniX commented: Nice coded comment. Thankyou. +1
Shanti C 106 Posting Virtuoso

use this line instead of return true in your js code:

theform.action="anotherpage.php";
Shanti C 106 Posting Virtuoso

try this code:

$qry=mysql_query("SELECT * FROM yourtablename "); 
$num=mysql_num_rows($qry);
$start=0;
$len=1000;
$value=$_POST['field']
while($start<$num)
{
$f="update tablename set field='".$value."' LIMIT $start,$len";
$start=$start+1000;
$len=$len+1000;
}
Shanti C 106 Posting Virtuoso

or try this:

SELECT t1.Name, SUM(t1.Salary + t2.Bonus) as Total From tb1 as t1, tb2 as t2 WHERE t1.Name = t2.Name group by t1.Name order by t1.Salary
Shanti C 106 Posting Virtuoso

hello try this:

<?
if($_SERVER['REQUEST_METHOD']=='POST')
{
$qry1="SELECT * FROM yourtablename  WHERE correct_answer='".$_POST['ans']."'";
		$res1=mysql_query($qry1) or die(mysql_error());
		$num1=mysql_num_rows($res1);
			if($num1==1)
			{
			echo "correct answer";
			}
			else
			{
			echo "wrong answer!!";
			}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?
$qry="SELECT * FROM yourtablename  "; 
$res=mysql_query($qry1) or die(mysql_error());
$result=mysql_fetch_array($res);
?>
<form action="" method="post" name="form1">
<table width="100%" border="0">
  <tr>
    <td>1.When of the following is NOT used to test an expression?</td>
  </tr>
  <tr>
    <td><label>
      <input name="ans" type="radio" value="<?=$result['question1']?>" />
    </label>
    A. if ()else statement</td>
  </tr>
  <tr>
    <td><input name="ans" type="radio" value="<?=$result['question1']?>" />
    B. is_double()</td>
  </tr>
  <tr>
    <td><input name="ans" type="radio" value="<?=$result['question1']?>" />
    C. x=y</td>
  </tr>
  <tr>
    <td><input name="isset()" type="radio" value="<?=$result['question1']?>" />
D. isset()</td>
  </tr>
</table>
</form>
</body>
</html>
Shanti C 106 Posting Virtuoso

try this:

$t=mysql_query("select * from headlines");
$result=mysql_fetch_array($t);
$r=mysql_query("select c as count(*) from comments where hidofctbl='".$result['hid']."'");
Shanti C 106 Posting Virtuoso

AVG(Votes) is exactly what you want......

Shanti C 106 Posting Virtuoso

use this code:

<a href="javascript:;" onClick="window.open('yourpage.php?id=<?=$row['reportid'];?>','no','scrollbars=yes,width=600,height=550')" >View</a>
Shanti C 106 Posting Virtuoso

you can use this code when you have used sessions in your login page...
use this code at your logout page:

session_unregister('username');
session_destroy();
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

try this:

echo $r1="SELECT assignment.Candidate, assignment.Chaplain, assignment.Reader, assignment.Id, tbl_user.Id, tbl_user.name_pre, tbl_user.name_first, tbl_user.name_last
FROM assignment, tbl_user
WHERE assignment.Id=tbl_user.Id
ORDER BY assignment.Candidate ASC"
$r=mysql_query($r1);

And make sure that query is correct...

Shanti C 106 Posting Virtuoso

hello..
try this code:

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Third Santor</title>
<script>
  function generate(){
    var myDiv = document.getElementById('someid');
      var objTextArea = document.getElementById('mem1');

    var list = objTextArea.value.split('\n');

      
      var tbody = document.createElement('tbody');

      for(var i=0; i<list.length; i++){       

        var cell1 = document.createElement('td');
        var label = document.createTextNode(list[i]);
        cell1.appendChild(label);

        var cell2 = document.createElement('td');
        var textbox = document.createElement('input');
        textbox.type = 'text';
        textbox.id = list[i];
        cell1.appendChild(textbox);

        var row = document.createElement('tr');
        row.appendChild(cell1);
        row.appendChild(cell2);
        
        tbody.appendChild(row);
      }

    var table = document.createElement('table');
      table.border = 1;
      table.appendChild(tbody);

    /*  var submit = document.createElement('input');
    submit.type = 'submit';
      submit.value = 'Submit';
*/
      myDiv.appendChild(table);
      myDiv.appendChild(submit);      
  }
</script>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<form name="frm1" method="post" action="" onsubmit="return ">
<textarea name="mem1" id="mem1" rows="10" cols="30"></textarea>
<input type="button" value="Generate" onclick="generate();">
</form>
<DIV id="someid"></DIV>
</body>
</html>

and also check:
http://www.daniweb.com/forums/thread135356.html

Shanti C 106 Posting Virtuoso

You are Welcome!!!!!!

Shanti C 106 Posting Virtuoso

hello..
that is CAPTCHA ..means creating dynamic number on an image...
It is used to prevent spam abuse on the websites
For more information:
http://www.webcheatsheet.com/PHP/create_captcha_protection.php

OmniX commented: Very useful and informative information. +1
Shanti C 106 Posting Virtuoso

you mean dynamic text box generation...
or
what do you mean by fields here?