Jump to content

Thivya

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Thivya's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hello, I am novice as for the posgresql...i am doing a project on wireless sesnor nodes.data will be stored in Posgresql...now i just export the collected data into yy.csv(Excell ) file..then i manually add them in to the table...I am using php for my project...how to see the collected data in posgresql without export into .cvs file?In posgresql ,where the data being stored?How i can see the data.. By the way the table will be created by default by the Mote View software(used for visualizing the collected data from sensor nodes)... As for the xampp,we able to create password,username and able to create the table...we also can view anything form the xampp server..Because we can open the server by (http://localhost/xampp)... How this things work in posgresql?? I want the system to read data from the table automatically...now i am inserting the data manually...it takes time...and its not logic too... Anyone please help me.... Thank you.
  2. hello, Thanks for the given codes...but sorry,i mistakenly add the the word 'start' and 'end' in my previous codes...actuatually i assume start as calendar3 and end as calendar3 ...Just ingore the start and end date... It is something like this ..generate a graphs that is between the date captured by calendar 2(start date) and calendar 3(end date)..calendar2 and calendar3 is the javapicker in my forms.From the selected dates between calendar2 and calendar 3,the graphs will generated... As for this code,graphs will be generated for that one specfic date only...where the date picked by calendar [code]<? echo "<img src=\"Specific_Temperature_Line_Graph.php?calendar={$_POST['calendar']}\">"; ?> <?php echo "<img src=\"Specific_Temperature_Line_Graph.php?start={$_POST['start']}&end={$_POST['end']}&calendar3={$_POST['calendar3']}\">"; ?> This is the code that you provide..Seems my previous questions include the start and end date,you have inserted the start and end date as well...Actually in my real coding here i just assume calendar2 as (start) and calendar3 as (end)... So,with only having calendar2 and calendar 3....how the codes will be?Is it something like this? <?php echo "<img src=\"Specific_Temperature_Line_Graph.php?start={$_POST['start']}&end={$_POST['end']\">"; ?>[/code] Could you please explain which syntax has been used to show (BETWEEN)..seems the it should generate graph between calendar2(start date) and calendar3(end date)? Sorry again for the wrong information... thank you for your time...
  3. hai... I got the answer ready...Actually it should be like this? <? echo "<img src=\"Specific_Temperature_Line_Graph.php?calendar={$_POST['calendar']}\">"; ?> Now to pass a value that has a start and end value,how the codes should be?Referrint to the below sql command i have to get value for all details between the start and end date.... $sql = "SELECT Node_ID , AVG(voltage),AVG(Temper), AVG(light),AVG(accel_x), AVG(accel_y), AVG(mag_x), AVG(mag_y), AVG(mic),Date from suhu "; $sql .= " WHERE (suhu.Date ='{$_POST['calendar']}')group by Node_ID"; I come up with the below codes...it never produces any ouput...neither errors displayed as well.. <? echo "<img src=\"Specific_Temperature_Line_Graph.php?start={$_POST['start']}=> {$_POST['end']}&&calendar3={$_POST['calendar3']}<={$_POST['calendar3']} \">"; ?> Meaning that the syntax is wrong ,or somethg wrong in the ">,<"?? Help me to review this codes....thank you in advance...
  4. hello, I have some doubts here..i need to convert an output that was generated by the php code,in to pdf format..?i meant i want the output in pdf format before sent to browser? I have gone through some tutorials,but it more on create pdf file,where they create a new file then they open it in pdf...like the pdf have "Hello World!!" My questions are how to convert an exsiting php output into pdf?what are the codes have to be added in the php codes?? Is there any suggestions?Is there any sites explain on this matter? Thank you for your time..Your help very much appreciated..
  5. I did some changes as below... <? echo '<src image="Graph.php?suhu.Date='_POST['calendar']' ">'; ?> I got parse error as follows... Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in C:\Program Files\xampp\htdocs\PEDWSN\Search_Data.php on line 71 How to detect this error?Could you please the codes,did i missed anything?Is the code is correct? and i changed the sql command at graph.php as below.. $query = "SELECT Node_ID , AVG(voltage),AVG(Temper), AVG(light),AVG(accel_x), AVG(accel_y), AVG(mag_x), AVG(mag_y), AVG(mic),Date from suhu WHERE (suhu.Date ='{$_GET[['calendar']}')group by Node_ID"; thank you for your time...
  6. Yes it works.... Now i have another problem with the coding... The graph actually will be generated by the start and the end date that was selected bt the user,i named that page as Search_date..then i by using the post method ,i post this page to another page i named it Data_Display(to display data only)..I did the same thing for drawing graph also from one page(user select tha date,to view graph for that date) to another page(this page will have coding for drawing the graph).... Now ,what i am expecting to do this from 1 page(the user select date),it will post to both pages which one is for display data and the other one for drawing graph... Then in the display_data page i will put code this code Code: <img src="graph.php"> then both data and the graph will be displayed... When i try it doesnt work ,because cant post one page to two pages.....So what the output that i can get is only the data being displayed,but as for the graphs...error message from Jpgraph saying no data is being selected to plot the data" This is because information from Search_Data was not post to graph page...thats why no points being selected for plotting the graph.... I am not sure whether my question is clear enough or not?? Briefly "How to display graph(dynamic,because it will change according to what date the user choose) with data ?" Is there any other suggestion? thank you for your time.....
  7. hello, I have draw a graph using Jpgraph components,able to display the graph as well.Now i want the data that has been used for plotting that graphs also to be displayed at the bottom of the graph.I can display the data in table format but i dont know how can combine both graph codes and codes for the table..the following is the codes for the graph.. <?php $db_name = "wsn"; $table_name = "suhu"; $connection = @mysql_connect("localhost", "", "") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); $query = "SELECT Date, AVG(voltage),AVG(Temper), AVG(light),AVG(accel_x), AVG(accel_y), AVG(mag_x), AVG(mag_y), AVG(mic) from suhu WHERE Date >= '{$_POST['Year']}-{$_POST['Month']}-01' and Date <= '{$_POST['Year']}-{$_POST['Month']}-31' group by `Date` "; $result = mysql_query($query) or die(mysql_error()); include ("c:/jpgraph-1.21b/src/jpgraph.php"); include ("c:/jpgraph-1.21b/src/jpgraph_Line.php"); while($row = mysql_fetch_array($result)) { $data[] = $row["AVG(mag_x)"]; $leg[] = $row["AVG(mag_y)"]; } $graph = new Graph(1000,1000); $graph->SetScale("textint"); $graph->img->SetMargin(50,30,50,50); //$graph->SetBackgroundImage("Blue hills.jpg",BGIMG_FILLFRAME); $graph->SetShadow(); $graph->xaxis->SetTickLabels($leg); $lplot = new LinePlot($data); $lplot->SetFillColor("lightgreen"); // Fill color $lplot->value->Show(); $lplot->value->SetFont(FF_ARIAL,FS_BOLD); $lplot->value->SetAngle(45); $lplot->value->SetColor("black","navy"); $lplot->SetLegend("Light"); $graph->title->Set("Light based on selected month"); $graph->xaxis->title->Set("mag_x"); $graph->yaxis->title->Set("mag_y"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->Add($lplot); $graph->Stroke(); ?> And this the codes this is the code that i use to display the data in table format. <? //set up database and table names $username = ""; // change this to your username $password = ""; // change this to your password $link = @mysql_connect ($server, $username, $password) or die (mysql_error()); /* Defines the Active Database for the Connection */ if (!@mysql_select_db("wsn", $link)) { echo "<p>There has been an error. This is the error message:</p>"; echo "<p><strong>" . mysql_error() . "</strong></p>"; echo "Please Contact Your Systems Administrator with the details"; } /* Sets the SQL Query */ $sql = "SELECT Node_ID , AVG(voltage),AVG(Temper), AVG(light),AVG(accel_x), AVG(accel_y), AVG(mag_x), AVG(mag_y), AVG(mic),Date from suhu "; $sql .= " WHERE (suhu.Date ='{$_POST['calendar']}')group by Node_ID"; /* Passes a Query to the Active Database */ $result = mysql_query($sql, $link); $num=@mysql_num_rows($result); if($num<1) { $mesg = "SORRY!!! NO RECORDS BY THIS NAME<P>PLEASE TRY ANOTHER"; header( "Location: http://localhost/PEDWSN/message.php?mesg=$mesg"); exit; } /* Starts the table and creates headings */ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Performance and Visualization Of Wireless Sensor Network-Main Page</title> <style type="text/css"> <!-- body { background-color: #FFFFFF; } .style5 { font-family: "Courier New", Courier, mono; color: #000000; font-size: 18px; font-weight: bold; } .style6 {font-family: "Courier New", Courier, mono; color: #0000FF; font-size: 18px; font-weight: bold; } .style7 {font-size: 24px} .style8 {font-family: "Courier New", Courier, mono; color: #0000FF; font-size: 24px; font-weight: bold; } .style11 {color: #0000FF} .style12 {font-size: 24px; font-family: "Courier New", Courier, mono; } --> </style></head> <body> <p> <img src="image/logo.jpg" width="208" height="201"> <img src="image/text2.jpg" width="701" height="80"></p> <p> <center> <img src="image/frame1.jpg" width="1051" height="51"><? echo "$display_block";?> <table> <tr> <td><strong> Date </strong></td> <td><strong>Nodes </strong></td> <td><strong>Volts </strong></td> <td><strong>Temperature </strong></td> <td><strong>Light </strong></td> <td><strong>accel_x </strong></td> <td><strong>accel_y </strong></td> <td><strong>mag_x </strong></td> <td><strong>mag_y </strong></td> <td><strong>mic </strong></td> </tr> <? /* Retrieves the rows from the query result set and puts them into a HTML table row */ while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo("<tr>\n\n<td> " . $row["Date"] . " </td>"); echo("<td>\n" . $row["Node_ID"] . " </td>\n"); echo("<td>\n" . $row["AVG(voltage)"] . " </td>\n"); echo("<td>\n" . $row["AVG(Temper)"] . " </td>\n"); echo("<td>\n" . $row["AVG(light)"] . " </td>\n"); echo("<td>\n" . $row["AVG(accel_x)"] . " </td>\n"); echo("<td>\n" . $row["AVG(accel_y)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mag_x)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mag_y)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mic)"] . " </td>\n"); } /* Closes the table */ ?> </p> </center></p> <table width="440" border="0" align="center"> <tr> <td width="103" class="style11"><span class="style12"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22"> <param name="movie" value="BckViewDetails.swf"> <param name="quality" value="high"> <embed src="BckViewDetails.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed> </object> </span></td> <td width="103" class="style11"><p align="center" class="style12"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22"> <param name="movie" value="Print.swf"> <param name="quality" value="high"> <embed src="Print.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed> </object> </p></td> <td width="100" class="style11"> </td> <td width="106" class="style11"> </td> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> </tr> </table> <div align="center" class="style11"></div> <p align="left" class="style11"> </p> </body> </html> Now i come up with this codes to display the desired output..but it shows error... <?php $db_name = "wsn"; $table_name = "suhu"; $connection = @mysql_connect("localhost", "", "") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); $query = "SELECT Date, AVG(voltage),AVG(Temper), AVG(light),AVG(accel_x), AVG(accel_y), AVG(mag_x), AVG(mag_y), AVG(mic) from suhu WHERE Date >= '{$_POST['Year']}-{$_POST['Month']}-01' and Date <= '{$_POST['Year']}-{$_POST['Month']}-31' group by `Date` "; $result = mysql_query($query) or die(mysql_error()); include ("c:/jpgraph-1.21b/src/jpgraph.php"); include ("c:/jpgraph-1.21b/src/jpgraph_Line.php"); while($row = mysql_fetch_array($result)) { $data[] = $row["AVG(mag_x)"]; $leg[] = $row["AVG(mag_y)"]; } $graph = new Graph(1000,1000); $graph->SetScale("textint"); $graph->img->SetMargin(50,30,50,50); //$graph->SetBackgroundImage("Blue hills.jpg",BGIMG_FILLFRAME); $graph->SetShadow(); $graph->xaxis->SetTickLabels($leg); $lplot = new LinePlot($data); $lplot->SetFillColor("lightgreen"); // Fill color $lplot->value->Show(); $lplot->value->SetFont(FF_ARIAL,FS_BOLD); $lplot->value->SetAngle(45); $lplot->value->SetColor("black","navy"); $lplot->SetLegend("Light"); $graph->title->Set("Light based on selected month"); $graph->xaxis->title->Set("mag_x"); $graph->yaxis->title->Set("mag_y"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->Add($lplot); $graph->Stroke(); while($row = mysql_fetch_array($result)){ echo("<tr>\n\n<td> " . $row["Date"] . " </td>"); echo("<td>\n" . $row["Node_ID"] . " </td>\n"); echo("<td>\n" . $row["AVG(voltage)"] . " </td>\n"); echo("<td>\n" . $row["AVG(Temper)"] . " </td>\n"); echo("<td>\n" . $row["AVG(light)"] . " </td>\n"); echo("<td>\n" . $row["AVG(accel_x)"] . " </td>\n"); echo("<td>\n" . $row["AVG(accel_y)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mag_x)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mag_y)"] . " </td>\n"); echo("<td>\n" . $row["AVG(mic)"] . " </td>\n"); } ?> How i can combine this both codes ,to produce both graphs and the data in table format?Could someone please help me... Thank you for the time...
  8. hi, Again here...here i have problem in sql commands..i am wondering whether is it possible for the sql to calculate average and display data as i wanted....here is my question... I have these values in my table...like this Node_id temperature light voltage Date light accel_x accel_y mag_x mag_y mic _______________________________________________________________________________ 1 25 200 2.5 12.09.2003 0.9877 0.98765 0.766 0.654 232 1 27 466 3.4 13.04.2005 0.8776 0.53442 0.7542 0.342 76 1 34 675 2.6 12.08.2003 0.8775 0.76643 0.87654 0.654 76 1 1 2 2 3 3 4 4 5 5 i need to find the average for all the nodes...each nodes will collect data 5 times..the output should be like this Node1 temperature light voltage light accel_x accel_y mag_x mag_y mic node1 23 ..... node2 34...... I start my command like below...It produced error results... select avg(temperature),avg(light),avg(voltage),avg(accel_x),avg(accel_y),avg(mag_x),avg(mag_y) from suhu HAVING{(suhu.Node_ID="1","2","3","4","5}}; Could someone help?Do i have to come out with 5 sql commands for each node?is that possible?Any other suggestion?doi have to calculate it manually for this case? thank you for your time...
  9. hello , is anyone have play around with MoteView,crossbow products ,using wirelsess sensor nodes to detect environmental changes???I just connect the MIB510 to my pc...using the moteview tool i try to connect the server,but error message comes out...telling that.."Xsocket:Localhost not connected....by the way the moteview tool has posgresql to store the collected data in database....I am not sure whether i am using proper terms to explain...but it is somethg like that..if anyone have experienced this please guide me.... thank you for your time.....
  10. hello, i am just start using Posgresql for my project.This is something do with crossbow products,using wireless sensor nodes to detect environmental changes...i use the moteview too which use Posgresql as database server...when i am trying to connect the tool to pc,this message come out...Xsocket:localhost not connected...why??anyone know?? before this i use the xampp for my project...when i am using posgresql i just exit the xampp amd start the Posgresql...but i still got the error messages come out....???how to overcome this? By the way in posgresql how we can see the localhost of it...for example in xampp,we can go to that server by (http://localhost/xampp)...how to do this in posgresql???I am new to this...some one pleese guide me.... thanks for your time...
  11. hi, I have tried to do as the given code...but only the icon for the picture is appearing,the picture still fail to be displayed...i think my codes got some errors somewhere...So i am giving here the codes that i use,which you provide yesterday...could you please go through the codes and see what is the problem...pls... <? //set up database and table names $db_name = "wsn"; $table_name = "message"; //connect to MySQL and select database to use $connection = @mysql_connect("localhost", "123", "Thivya") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection);// or $page_name="Forum.php"; if(!isset($start)) { // This variable is set to zero for the first page $start = 0; } $eu = $start; $limit = 3; // No of records to be shown per page. $current = $eu + $limit; $back = $eu - $limit; $next = $eu + $limit; $query = " SELECT pid, usrname_email, userID, userstatus, full_message FROM $table_name ORDER BY userstatus "; $result = mysql_query($query) or die(mysql_error()); $num = mysql_num_rows($result); if($num<1) { $mesg = "SORRY!!! NO RECORDS BY THIS NAME<P>PLEASE TRY ANOTHER"; header( "Location: http://localhost/fyp/message2.php?mesg=$mesg"); exit; } while($row = mysql_fetch_array($result)) { $display_block .= " <tr><td>---------------------------------------- <font color=blue><p>User/Email:".$row['username']." ".$row['userID']."</font> <img src=\"viewimage.php?pid=".$row['pid']."\" align=left ...> ----------------------------------------<p> User Status:$row['userstatus']<p>Date:$row[date]<p>Full Message:$row['full_message'] </td> </tr>"; }?> <html> <head> <title>PEDVWSN...</title> <link rel="stylesheet" type="text/css" href="style.css"> <style type="text/css"> <!-- .style1 {font-size: 12px} --> </style> </head> <body leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" bgcolor="#01557C"> <table width="759" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="256"><img src="images/main01.jpg" width="256" height="41"></td> <td background="images/fon01.gif"> <table width="503" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="270"><a href="#"><img src="images/but_home.gif" width="74" height="41" border="0"></a><img src="images/separator.gif" width="2" height="41"><a href="#"><img src="images/but_site_map.gif" width="94" height="41" border="0"></a><img src="images/separator.gif" width="2" height="41"><a href="#"><img src="images/but_contacts.gif" width="96" height="41" border="0"></a><img src="images/separator.gif" width="2" height="41"></td> <td width="233"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10%"> <p></p> </td> <form method="POST" action="Search_ResearcherMain.php"> <td class="title"><b><font color="#000000">SEARCH</font></b> <input type="Text" name="keyword" value="" size="10" align="absmiddle"> <input type="Image" src="images/b_go3.gif" width="22" height="28" alt="" border="0" hspace="10" align="absmiddle" name="Search"> </td> </form> </td> <td width="10%"></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td height="157"><img src="images/PESWSN.bmp" width="256" height="153"></td> <td width="503"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="503" height="157"> <param name="movie" value="images/FLASH.swf"> <param name=quality value=high> <embed src="images/FLASH.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="503" height="157"></embed> </object></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="759" align="center" background="images/fon_menu.gif"> <tr> <td><img src="images/menu01.gif" width="3" height="42" alt="" border="0"></td> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><p class="menu01"><a href="" class="style1">HOME</a></p></td> <td><img src="images/e_menu.gif" alt="" width="24" height="42" border="0"></td> <td><p align="center" class="menu01"><a href="UpdateResearcherProfile.php">Edit Profile</a></p></td> <td><img src="images/e_menu.gif" alt="" width="24" height="42" border="0"></td> <td><p align="center" class="menu01"><a href="">Update Data</a></p></td> <td><img src="images/e_menu.gif" alt="" width="24" height="42" border="0"></td> <td><p align="center" class="menu01"><a href="Researcher_view_message.php">View Comment</a>s</p></td> <td><img src="images/e_menu.gif" alt="" width="24" height="42" border="0"></td> <td><p align="center" class="menu01"><a href="log_out.php">Sign Out</a></p></td> <td><img src="images/e_menu.gif" alt="" width="24" height="42" border="0"></td> </tr> </table> </td> <td align="right"><img src="images/menu02.gif" width="3" height="42" alt="" border="0"></td> </tr> </table> <div align="center"><img src="images/main01.gif" width="759" height="5" alt="" border="0"></div> <table border="0" cellpadding="0" cellspacing="0" width="759" align="center"> <tr valign="top"> <td background="images/fon_left.gif"><img src="images/fon_left.gif" width="3" height="13" alt="" border="0"></td> <td width="753" bgcolor="#FFFFFF"> <p class="px5"> <table border="0" cellpadding="12" cellspacing="0" width="100%"> <tr valign="top"> <td align="right"> <!-- left --> <!-- /left --></td> <td> <!-- right --> <table width="571" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td> </tr> <tr> <td width="97" rowspan="3" bgcolor="white"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td> <td bgcolor="white" height="4"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td> <td width="4" rowspan="3" bgcolor="white"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td> </tr> <font size="+2" style="color:696969" face="Tahoma">WELCOME <? echo $name ?>... </font> <tr> <td width="357"> <table cellspacing=3 cellpadding=3 > <? echo "$display_block";?> <?php echo "<table align = 'center' width='50%'><tr><td align='left' width='30%'>"; //// if our variable $back is equal to 0 or more then only we will display the link to move back if($back >= 0) { print "<a href='$page_name?start=$back'> <font face='Verdana' size='+1'>PREV</font></a>"; } // Let us display the page links at center. We will not display the current page as a link echo "</td><td align=center width='30%'>"; $i=0; $l=1; for($i=0; $i < $num; $i=$i+$limit) { if($i <> $eu) { echo " <a href='$page_name?start=$i'> <font face='Verdana' size='+1'>$l</font></a> "; } else { echo "<font face='Verdana' size='+2' color=red>$l</font>"; /// Current page is not displayed as link and given font color red } $l=$l+1; } echo "</td><td align='right' width='30%'>"; // If we are not in the last page then Next link will be displayed. Here we check that if($current < $num) { print "<a href='$page_name?start=$next'> <font face='Verdana' size='+1'>NEXT</font></a>"; } echo "</td></tr></table>"; ?> <p class="left" style="color: #FF6600;"> </p> <p class="left" style="color: #FF6600;"> </p> <p class="left"> </p> <p class="left"> </p> <div align="center"> </div> <table border="0" cellpadding="5" cellspacing="0"> <tr valign="top"> <td align="right" width="170"><p class="px5"></td> <td> <p class="left" style="color: #FF6600;"> </p> <p class="left" style="color: #FF6600;"> </p><p class="left"> </p> <p class="left"> </p> <form method="post" action="ResearcherMain.php"><input type="submit" name="submit" value=" Next Search"></a> </td> </tr> </table> </td> </tr> <tr> <td background="images/t_fon.gif" height="28"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td> </tr> <tr> <td colspan="3" align="right"><img src="images/t_bot.gif" width="229" height="9" alt="" border="0"></td> </tr> </table> <!-- /right --> </td> </tr> </table> <br> </td> <td background="images/fon_right.gif"><img src="images/fon_right.gif" width="3" height="10" alt="" border="0"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="759" align="center"> <tr> <td colspan="2" background="images/fon_bot.gif" height="42" align="right"> <table border="0" cellpadding="0" cellspacing="0" width="510" background=""> <tr> <td><p class="menu02"> </p></td> <td><p class="menu02"> </p></td> <td><p class="menu02"> </p></td> <td><p class="menu02"> </p></td> <td><p class="menu02"> </p></td> <td> </td> <td><p class="menu02"> </p></td> </tr> </table> </td> </tr> <tr align="center"> <td width="270" height="80"> </td> <td width="490"><p align="center" style="color: #FFFFFF;"> </p></td> </tr></table> </body></html> and this is the viewimage.php codes.... <?php //viewimage.php Header("Pragma: no-cache"); Header("Cache-Control: no-cache"); Header("Expires: ".GMDate("D, d M Y H:i:s")." GMT"); if (isset($_GET['pid']) && is_int($_GET['pid'])) { mysql_connect("localhost", "123", "Thivya") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection);// or $res = mysql_query("select imgdata from message where pid = ".$_GET['pid']); if ($res) { $row = mysql_fetch_assoc($res); // This is only if you are storing jpeg images Header("Content-type: image/jpeg"); Header("Content-Disposition: inline; filename=images".$_GET['pid'].".jpeg"); echo base64_decode($row['imgdata']); } } ?> I want to know,whether i can use the lonblob as data type for the image or not?? Hope to get a reply....sorry for keep asking the same question again....Thankx...
  12. hi, $sql = "SELECT * FROM Temper WHERE Date >= '{$_POST['year']}-01-01' and Date <= '{$_POST['year']}-12-31'" Actually the above sql command work!It display the output as i expect...i wrongly name my textbox,thus i was unable to get the right output...So after i correct it i[tt][/tt]display the output as i expected... Thanks a lot.... I have a another question ,if you dont mind ,can youi please help me again...i already have my table to store image,where i have table named(message),fields are(imgdata[longblob]),pid(increment by default),...my database named as "wsn"... Now i was able to retieve other values from the table except the image..i had tried all the coding that were discussed in the forum...But is still not working... ??? My output should be like this, John date posted Message ---------------- Ally Dte posted Message ...................... until all the data from that table will be displayed ....my coding are as belows......That codes i used for the searching based on keyword(just ignore that part)..I don't know...How to display the image next to the person name.... Hope to get a reply...thankx a lot...
  13. Try to look at this forumhttp://www.keithjbrown.co.uk/vworks/php/php_p2.php If you textbox is yampart,then in your query ... $query = "select * from yamaha_parts WHERE ITEM_NO ='{$_POST['yampart']}')"; If you go through the ulr that i gave surely you will be able to overcome your problem...It helps me... Good luck...
  14. The given sql commands still can't retrieve data from the table... For this command, SELECT * FROM Temper WHERE YEAR(`Date `)='2007'; It looks like it will only retrieve data for the year 2007 only...I want the result based on the user what user key in the textbox( i named the text box as year) ...The year will be in date(10.10.2007,...).So the query must be able to match the user input in table in Date field... In this command, $sql = "SELECT * FROM Temper WHERE Date >= '{$_POST['year']}-01-01' and Date <= '{$_POST['year']}-12-31'" The command still fail to display the data..But i think it looks like as i wanted...Can you please try to review this command and help me... Thanks for all the reply...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.