ujjval dave 0 Light Poster

hey guys,
I need your help for mysql query.let me tell you one thing, it's a dynamic query whatever the user selects in another page, those value will be set in mysql query.

The problem is that it's not giveing me any data from that query.
So Please give me a solution for it or give me some suggestions.

Thanks
Coding part one for fetching data from another page

<?php
error_reporting(0);
if((isset($_GET['filters'])))
{
	$hidn = $_GET['filters'];
}
else
{
	header("Location: serach-agent.php");
}
if((isset($_GET['seearchs'])))
{
	$dropd = $_GET['seearchs'];
}
else
{
	header("Location: serach-agent.php");
}

echo $hidn . ' And ' . $dropd;
?>

Coding part two for fetching data from database
problem occurs on line no. 39

<?php

//if($fnds == 1)
{

error_reporting(0);
echo '<table width="650" border="1.5" bgcolor="#D9EFC2">
  <tr>
    <th scope="col">Publisher Name</th>
    <th scope="col">Website</th>
    <th scope="col">Network</th>
    <th scope="col">comments</th>
    <th scope="col">Date</th>
	<th scope="col">Agent Name</th>
    <th scope="col">Action</th>
    
  </tr>';
// Connects to your Database
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("db") or die(mysql_error());

$first = 0;

$START=$_GET['start'];
if(!$START)
{
    $START=0;
}

$data = mysql_query("SELECT * FROM pubapp WHERE chked=1 and fpub=1 and achked!=1 ORDER BY date DESC") or die(mysql_error());
$total = mysql_num_rows($data);
echo $total;
$LIMIT = 4;
$NEXT=$START+$LIMIT;
$PREV=$START-$LIMIT;

$last = $total;   

$data_S = mysql_query("SELECT * FROM pubapp WHERE $hidn='$dropd' and chked=1 and fpub=1 and achked!=1 ORDER BY date DESC LIMIT $START,$LIMIT") or die(mysql_error());

while($info = mysql_fetch_array( $data_S ))
{
  
   
 
  if($info['fpub'] == '1' and $info['chked'] == '1')
  {
   	
	echo '<tr>';
    echo '<td>' . $info['pubname'] . '</td>';
    echo '<td>' . $info['site'] . …
ujjval dave 0 Light Poster

Thanks guys,
I am not sure whether they are strict about this or not. As per your suggestions i will try to develop this with the help of api or extra plugin.

@ardav internal pages means profiles of users,that i've to use for member suggestions.

Thanks Again

ujjval dave 0 Light Poster

hey guys,
i need your help to develop thumshot of page of website's internal pages.
pls if you know how to develop this code or if u have any suggestions for it then pls tell me.
Thanks

ujjval dave 0 Light Poster

hey Qeeqie,

you can use java script or marquee tag for moving images.
thanks

ujjval dave 0 Light Poster

I think gmap is best for you and you can use google analytics for visitors information.
Thanks

ujjval dave 0 Light Poster

Hey Friends,
I have problem with flash preloader file.
I am designing this flash file in flash cs3.i have used action script3.
problem is for repeating loding banner in my flash file.
i m new in flash designing.
I have attached my flash file.
pls tell what's the problem.
action script code

import flash.events.Event;
stop();

this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void{

var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;

domainname.scaleX = loaded/total;
loader_txt.text = Math.floor((loaded/total)*100)+ "%";

if (total == loaded){

this.removeEventListener(Event.ENTER_FRAME, loading);
play();
}


}

Thanks

ujjval dave 0 Light Poster

thanks Javvy

ujjval dave 0 Light Poster

hey guys,

first of all i want to say thanks to paullanesra and anilashanbhag.
i had found required xml from your given link,it works but shows weather in text format.
can you tell me how to use weather icons for this xml bcaz i m new for this thing i don't how to use it.
Thanks

ujjval dave 0 Light Poster

well it's my mistake, i forgot to declare all variables.
when i was posting this problem.
$total is a variable to count no. of data stored in "scrapmsg" table and $current_img is containing the value of usercode that used for if condition.
if "scrapmsg's usercode" equals with $current_img them it goes in the if condition and print required data.

Thanks

ujjval dave 0 Light Poster

hey ardav,

this script is not printing data on the page.
this is the problem.
i don't know why is not working i had check this script for fetching data in simple form.data is coming on the page but in paging it's not coming.

So please help me if you have any solution for this problem.

Thanks

ujjval dave 0 Light Poster

hey guys,
I am facing problem to get weather information from client ip address.
i know how to get client ip address but i don't know how to get weather information.
please somebody help me for this problem.

Thanks

ujjval dave 0 Light Poster

hey,
i have problem with paging,i need to use two tables to fetch data.
i am submitting my developed code. i hope some body will help me.

mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());



$START=$_GET['start'];
if(!$START)
{
    $START=0;
}

$data = mysql_query("SELECT * FROM scrapmsg ORDER BY date DESC") or die(mysql_error());
$total = mysql_num_rows($data);
$LIMIT = 4;
$NEXT=$START+$LIMIT;
$PREV=$START-$LIMIT;
//This is your query again, the same one... the only difference is we add $max into it
$data_p = mysql_query("SELECT scrapmsg.ucode,scrapmsg.myomsg, acountseting.usercode, acountseting.fnm, acountseting.imgpath ". "FROM scrapmsg, acountseting "."WHERE scrapmsg.rcode = acountseting.usercode ORDER BY scrapmsg.rcode DESC  LIMIT $START,$LIMIT") or die(mysql_error());

//$query = "SELECT scrapmsg.ucode,scrapmsg.myomsg, acountseting.usercode, acountseting.fnm, acountseting.imgpath ". "FROM scrapmsg, acountseting "."WHERE scrapmsg.rcode = acountseting.usercode ORDER BY scrapmsg.rcode DESC";
while($info = mysql_fetch_array( $data_p ))
{
  
  if($info['usercode'] == $current_img)
  {
  	print $info['ucode'] . " to " . $info['rcode'];
  	print $info['myomsg'];
  	print "<br>";
  }
}
ujjval dave 0 Light Poster

well thanks guys for reply

ujjval dave 0 Light Poster

hi guys,
i have confusion about comparing dates in php. i want to compare birth date with current date.
here is my code. i hope u will me to solved out this problem.
thanks

<?php //code for get values from session
session_start();

if(isset($_SESSION['I'])){
//this code will get email id from session
$myeid = $_SESSION['I'];
echo $myeid . "-<br>";
}
else{
header("Location: loginimgs.php");}

if(isset($_SESSION['NEED'])){
//this code will get password from session
$mypass = $_SESSION['NEED'];}
else{
header("Location: loginimgs.php");}

?>
<?php //code for get value of usercode from database
error_reporting(0);
$myuname = "";
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$check = mysql_query("SELECT * FROM members WHERE email = '$myeid'")or die(mysql_error()); 
while($info = mysql_fetch_array($check))
{
	if ($myeid == $info['email'])
	{
		$myuname = $info['username'];
		$mycode = $info['usercode'];
		
	}
}
$userscode = $mycode;

?>
<?php
error_reporting(0);
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$checky = mysql_query("SELECT * FROM acountseting")or die(mysql_error());

while($chec = mysql_fetch_array($checky)) 
{
	if($chec['usercode'] == $mycode)
	{
		$date2 = $chec['birthday'];
		 
		$name = $chec['fnm'];
		
		echo $date2;
	}

}


$date1 = date("Y-m-d");
echo "<br>" . $date1 . "<br>";


$today = strtotime($date1);
$expiration_date = strtotime($date2);

if ($expiration_date > $today) {
     $valid = "yes";
} else {
     $valid = "no";
}

echo "<br>" . $valid . "<br>";

$dateCmp=dateDiff("-",$date2,$date1);
function dateDiff($dformat, $endDate, $beginDate)
{
$date_parts1=explode($dformat, $beginDate);
$date_parts2=explode($dformat, $endDate);
$start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);
$end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);
echo $end_date . "<br>";
echo $start_date;
return $end_date - $start_date;

}

print $name . "'s birthday on" . $dateCmp;
?>
ujjval dave 0 Light Poster

well i had solved this problem
here is code

<?php
error_reporting(0);
$cout = 0;
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$query = "SELECT imgallry.dirname, members.usercode ". "FROM imgallry, members "."WHERE imgallry.usercode = members.usercode ORDER BY imgallry.date DESC";
//$ibo = "SELECT imgallry.dirname, imgallry.usercode FROM imgallry INNER JOIN members ON imgallry.usercode = members.usercode ORDER BY imgallry.date DESC";
$check = mysql_query($query)or die(mysql_error()); 
while($info = mysql_fetch_array($check))
{
	/*if ($info['members.usercode'] == $aros[$cout])
	{
		echo $info['members.username'];
		$cout = 1 + $cout;
	}*/
	
	echo $info['usercode']. " - ". $info['dirname'];
	echo "<br />";
}

?>
ujjval dave 0 Light Poster

hi every one,
i need your help in my php code.Currently i m developing one social site.
i had develop php code code for getting recent update from friends.
my error is for not printing recent update from friends.
i had tried my best but it's not working.
i m attaching code with this article.
please help me.

<?php //code for get values from session
session_start();

if(isset($_SESSION['I'])){
//this code will get email id from session
$myeid = $_SESSION['I'];}
else{
header("Location: loginimgs.php");}

if(isset($_SESSION['NEED'])){
//this code will get password from session
$mypass = $_SESSION['NEED'];}
else{
header("Location: loginimgs.php");}

?>
<?php //code for get value of usercode from database
error_reporting(0);
$myuname = "";
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$check = mysql_query("SELECT * FROM members WHERE email = '$myeid'")or die(mysql_error()); 
while($info = mysql_fetch_array($check))
{
	if ($myeid == $info['email'])
	{
		$myuname = $info['username'];
		$mycode = $info['usercode'];
		
	}
}
?>
<?php //code to fetch friends name from isfriend table and store them in array.
error_reporting(0);
$cout = 0;
$aros;
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$check = mysql_query("SELECT * FROM isfriend WHERE rececode = '$mycode'")or die(mysql_error()); 
while($info = mysql_fetch_array($check))
{
	if ($info['actives'] == 1 and $info['friends'] == 1)
	{
		
		$aros[$cout] = $info['usercode'];
		$cout = 1 + $cout;
	}
}
sort($aros);
?>
<?php //using inter join code will print username from member table and directory name from imgallry table 
error_reporting(0);
$cout = 0;
$aros;
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$ibo = "SELECT imgallry.dirname FROM …
ujjval dave 0 Light Poster

thanks chitan for chat example.
i hope it will useful for beginners.

ujjval dave 0 Light Poster

thanks Kieran Y5
i got my error.
thank you again.

ujjval dave 0 Light Poster

hi every one,
i need your help in php code.
my error is for profile page.
after implementing lots of php code in this page,my page became auto refresh in every 2secound.
i don't know what happend to it.
i m attaching my code pls elp me.

<?php //get code from session value
session_start();

if(isset($_SESSION['I'])){
//this code will get email id from session
$myeid = $_SESSION['I'];}
else{
header("Location: loginimgs.php");}

if(isset($_SESSION['NEED'])){
//this code will get password from session
$mypass = $_SESSION['NEED'];}
else{
header("Location: loginimgs.php");}

?>
<?php //get code for my code
error_reporting(0);
$myuname = "";
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$check = mysql_query("SELECT * FROM members WHERE email = '$myeid'")or die(mysql_error()); 
while($info = mysql_fetch_array($check))
{
	if ($myeid == $info['email'])
	{
		$myuname = $info['username'];
		$mycode = $info['usercode'];
		$_SESSION['USER'] = $myuname;
		
	}
}
?>
<?php //code for recent view insert
error_reporting(0);
$date = date("Y-m-d H:i:s");
if (isset($_GET['uid']))
{
	$serfcode = $_GET['uid'];
}
else
{
	echo '<META HTTP-EQUIV="Refresh" Content="2; URL=Profile.php">';
}

if (isset($_GET['uid']))
{
	if($_GET['uid'] != md5($mycode))
	{
		mysql_connect("localhost", "root", "") or die(mysql_error()); 
		mysql_select_db("dummy1") or die(mysql_error());
		$st = "INSERT INTO recentview (usercode, reccode, date) VALUES ('".$mycode."', '".$serfcode."', '".$date."')";
		$add_member = mysql_query($insert) or die(mysql_error());
	}
}
?>
<?php // check for user is friend or not
error_reporting(0);
if(isset($_GET['uid']))
{
	$uid = $_GET['uid'];
	mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("dummy1") or die(mysql_error());
$ssq = mysql_query("SELECT * FROM isfriend WHERE usercode = '$mycode'") or die(mysql_error());
while($info = mysql_fetch_array($ssq))
{
	if($info['rececode'] == $uid)
	{
	
	}
	else
	{
		echo '<META HTTP-EQUIV="Refresh" Content="2; …
ujjval dave 0 Light Poster

so you have to use get or post method in your page.
then in other page u can use your values,just fetch them and store them with insert query in mysql database.
example for get method
$value1 = $_get;
$value2 = $_get;
example for post method
$value1 = $_post;
$value2 = $_post;
if you successfully stored them in database then u can use paging to represent your stored data in good manner.

i hope this will help u.

ujjval dave 0 Light Poster

hey paulrajj thanks for your golden help.
this was a really silly mistake.
now my question is solved.
thanks again

ujjval dave 0 Light Poster

hi everyone,
i have a problem in my php code.i hope anyone of you can help me in this problem.
i have a problem for image uploading in particular folder.
my code works but this will upload images in root directory called as 'upimg'.
i want to upload images into particular directory(variable name as $dirna).
i m giving you my code.so pls help me.

<?php
if(isset($_SESSION['alnamae']))
{
	$alaname = $_SESSION['alnamae'];
}
else
{
	header("Location: addimg.php");
}
if(isset($_SESSION['dirna']))
{
	$dirna = $_SESSION['dirna'];
	//echo $dirna;
}
else
{
header("Location: addimg.php");
}
?>
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>

<head><title>Multiple image upload</title>

</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<?php
error_reporting(0);
	$path = "upimg/" . $dirna . "/";
	echo $path;
while(list($key,$value) = each($_FILES['images']['name']))
		{
			if(!empty($value))
			{
				$filename = $value;
					$filename=str_replace(" ","_",$filename);// Add _ inplace of blank space in file name, you can remove this line

					$add = $path."$filename";
					//$add = "upimg/$filename";
                       //echo $_FILES['images']['type'][$key];
			     // echo "<br>";
					copy($_FILES['images']['tmp_name'][$key], $add);
					//chmod("$add",0777);
			

			}
		}


?>
 
</body>

</html>
ujjval dave 0 Light Poster

i had tried on this code,but when this code is in running mode it will update all rows in database. I want to update specific row in database.
please somebody help to solve this problem.

ujjval dave 0 Light Poster

Hi there,

i need help in this part to set a sock5 proxy in vb.net application.
I know how to set http proxy but i don't know anything about sock5 proxy setting. I am new in sock5 proxy setting.

please tell how to do this.

thanks
dave

ujjval dave 0 Light Poster

hi guys please help me.i have confusion for file handling.
i am developing a application that uses one txt file. now i want to find a particular word from file and replace it as space. i don't how to do this.
please help me

ujjval dave 0 Light Poster

Hey peter_budo
Thanks For Your Golden advice
next time i'll remember this.
by the way i had developded this code.
after loop just put this code

MsgBox(Val(RichTextBox1.Find(" 127.0.0.1 www.songs.pk", RichTextBoxFinds.MatchCase)))

        RichTextBox1.SelectionFont = New Font("Verdana", 12, FontStyle.Bold)
        RichTextBox1.SelectionColor = Color.Red
ujjval dave 0 Light Poster

i am able to print all file line in to rich text box but i have a problem to find a specific word from the rich text box.please help me to solve this trouble.
here is my code for taking input from file and print into rich text box

Dim path2 As [String] = "file path"
        
        Dim d As New StreamReader(path2)
        'creating a new StreamReader and passing the filestream object fs as argument
        d.BaseStream.Seek(0, SeekOrigin.Begin)
        'Seek method is used to move the cursor to different positions in a file, in this code, to 
        'the beginning
        While d.Peek() > -1
            'peek method of StreamReader object tells how much more data is left in the file
            RichTextBox1.Text &= d.ReadLine()
            'displaying text from txt file in the RichTextBox
        End While
        d.Close()
ujjval dave 0 Light Poster

I am new in vb.net so i don't know how to take a print from a vb form.
thanks for this printing code.