Jump to content

jaiffed

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Everything posted by jaiffed

  1. I need PHP script for create a program i have 1 header.html (which is my header file) 2 menu.html(which contain menu on right of the page) 3 footer.html(which is my footer) 4 content.html(which is my content area of the page) 5 multiple around 10 .php form pages now i want to use them into single page which have header,menu,footer as same & my php forms call on content area. so plz help me out
  2. thanx possien your worked header("Location: dream.html"); after remove the echo $xml_output; great person thnx a lot.
  3. header("Location:dream.html"); not working...
  4. this is my file which make graph from saved .xml file change its ext .txt to .html [attachment deleted by admin]
  5. I have an dream.html file so i have to know how can i open this file after the end of this php file which create xml file. <?php // Set up our headers header( 'Content-type: text/xml; charset=UTF-8' ); // Bare bones XML to generate from. $xml_str = '<?xml version="1.0" ?><users></users>'; // Create a new instance of SimpleXML using the bones $xml = new SimpleXMLElement( $xml_str ); // Connect to database $db = new MySQLi( 'localhost','root','','db' ); // Grab all the users and the data we need $q = 'SELECT `id`,`name`,`email`,`realname` FROM `users`'; // Perform Query $r = $db->query( $q ); // Check if query failed. If so, echo empty XML file. Should log error. if( $r === FALSE ) die( $xml->asXML() ); // Loop through results while( $row = $r->fetch_assoc() ) { // Create a new child in '<users>' called '<user>'. Save this to // variable so we can give it arrtibutes and children $user = $xml->addChild( 'user' ); // Set attribute - '<user id="$id">' $user->addAttribute( 'id', $row['id'] ); // Give '<user>' children '<user id="$id"><name>$name</name></user>' etc. $user->addChild( 'name', $row['name'] ); $user->addChild( 'email', $row['email'] ); $user->addChild( 'realname', $row['realname'] ); } // Free up MySQL results $r->free(); // Echo our finished XML file. echo $xml->asXML(); $fhandle = fopen("data.xml", 'w') or die("can't create file"); fwrite($fhandle, $xml_output) or die("can't write to the file"); fclose($fhandle); ?> this file create the .xml file & save after that processing i want to open a html file which is dream.html i used include ' dream.html'; after the fclose($fhandle); but its not working getting errror
  6. after the end of script i want to call a HTML file called dream.html i used include ' dream.html'; but its gettin error so plz help me what is the code to call html file after the script processed.
  7. No, I am getting from mysql into array
  8. everything is done after using possien code at the end the script $fhandle = fopen("data.xml", 'w') or die("can't create file"); fwrite($fhandle, $xml_output) or die("can't write to the file"); fclose($fhandle) ?> Its work but after that how could i open html file i put include 'dream.html'; & some other codes but its not working help me again guys
  9. i want to create array from mysql what is the script for this...? value like $data = array("1" => .0032, "2" => .0028, "3" => .0021, "4" => .0033, "5" => .0034, "6" => .0031, "7" => .0036, "8" => .0027, "9" => .0024, "10" => .0021, "11" => .0026, "12" => .0024, "13" => .0036, "14" => .0028, "15" => .0025);
  10. yes i want to save as a .xml file & thanks u so much thiswork
  11. i want xml file in ths format <graph> <set name='Jan' value='17400' hoverText='January'/> </graph>
  12. im having error in this $db = new MySQLi( 'localhost','root','12345','rlist' );
  13. echo $xml_output .= saveXML(); $xml_output .= save("write.xml") i found this but its not working
  14. I have this code header("Content-type: text/xml"); $database = "rprice"; $linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host."); mysql_select_db($database, $linkID) or die("Could not find database."); $query = "SELECT * FROM plist ORDER BY date DESC"; $resultID = mysql_query($query, $linkID) or die("Data not found."); $xml_output = "<?xml version=\"1.0\"?>\n"; $xml_output .= "<graph>\n"; for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){ $row = mysql_fetch_assoc($resultID); $xml_output .= "\t<set date =\"" . $row['date'] . "\" value =\"" . $row['sprice'] . "\">\n"; $xml_output .= "\t</set>\n"; } $xml_output .= "</graph>"; echo $xml_output; I want to save this xml file into the folder name Data what is the code of that Plz help
  15. I have this script but it's not working properly it shows result but when i press next then same page and same result return in properly it shows next result <?php include('connect.php'); mysql_select_db($Db, $link); $limit=20; // rows to return $numresults=mysql_query("select * from mem_master"); $numrows=mysql_num_rows($numresults); if (empty($offset)) { $offset=0; } $result=mysql_query("select mem_id, mem_name, add1, add2, tel, mobile, email,balance". " from mem_master". " LIMIT $offset, $limit"); echo '<table width="100%" border="2">'; echo '<tr>'; echo "<td>" . "Member Id" . "</td>"; echo "<td>" . "Member Name " . "</td>"; echo "<td>" . "Address 1" . "</td>"; echo "<td>" . "Address 2" . "</td>"; echo "<td>" . "telephone" . "</td>"; echo "<td>" . "Mobile" . "</td>"; echo "<td>" . "Email" . "</td>"; echo "<td>" . "Balance" . "</td>"; echo '</tr>'; while ($data=mysql_fetch_array($result)) { echo "<tr> <td class='helpBod'>".$data['mem_id']."</td> <td class='helpBod'>".$data['mem_name']."</td> <td class='helpBod'>".$data['add1']."</td> <td class='helpBod'>".$data['add2']."</td> <td class='helpBod'>".$data['tel']."</td> <td class='helpBod'>".$data['mobile']."</td> <td class='helpBod'>".$data['email']."</td> <td class='helpBod'>".$data['balance']."</td> </tr>"; } echo '</table>'; if ($offset==1) { // bypass PREV link if offset is 0 $prevoffset=$offset-20; print "<a href=\"$PHP_SELF?offset=$prevoffset\">PREV</a> \n"; } $pages=intval($numrows/$limit); if ($numrows%$limit) { $pages++; } for ($i=1;$i<=$pages;$i++) { // loop thru $newoffset=$limit*($i-1); print "<a href=\"$PHP_SELF?offset=$newoffset\">$i</a> \n"; } if (!(($offset/$limit)==$pages) && $pages!=1) { $newoffset=$offset+$limit; print "<a href=\"$PHP_SELF?offset=$newoffset\">NEXT</a><p>\n"; } ?>
  16. is anything wrong in this syntax mysql_select_db($Db, $link); $limit=20; // rows to return $numresults=mysql_query("select * from mem_master"); $numrows=mysql_num_rows($numresults); // next determine if offset has been passed to script, if not use 0 if (empty($offset)) { $offset=0; } // get results $result=mysql_query("select mem_id,mem_name,add1,add2,tel,mobole,email.balance". "from mem_master". "LIMIT $offset,$limit"); // now you can display the results returned while ($data=mysql_fetch_array($result)) { echo '<tr>'; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['mem_id'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['mem_name'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['add1'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['add2'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['tel'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['mobile'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['email'] . "</a></td>"; echo '<td><a href="memmodify.php?itemmem='.$row[mem_id].'">' . $row['balance'] . "</a></td>"; echo '</tr>'; } echo '</table>'; it get error in that line while ($data=mysql_fetch_array($result)) { please help me i think problem is in $result=mysql_query("select mem_id,mem_name,add1,add2,tel,mobole,email.balance". "from mem_master". "LIMIT $offset,$limit"); because $result value shows 0
  17. I have this script <form name="memlook" method="post" action="memmodify.php"> <table width="277" border="0" align="center"> <tr> <td width="128"><input name="radio" type="radio" id="memid" value="memid" checked="checked" /> Member Id </td> <td width="139"><label> <input type="radio" name="radio" id="memname" value="memname" /> </label> Member Name</td> </tr> <tr> <td colspan="2"><input name="memdet" type="text" id="memdet" size="45" /></td> </tr> </table> <p> </p> <table width="62" border="0" align="center"> <tr> <td width="66"><input name="cmdsubmit" type="submit" id="cmdsubmit" value="Search" /></td> </tr> </table> now the problem is that i have two radio button as you see memid and memname now i want that if memid is selected an user press submit then memid.php file open and if user select memname and press submit then memname.php file open
  18. I have this code for grid view $query="select member_name from member where mem_id=$q && av=1"; $result= mysql_query($query,$link) or die(""); $fel=mysql_num_fields($result); $nro=mysql_num_rows($result); echo '<table border="2">'; echo "<td> Member Detail</td>"; while ($row = mysql_fetch_array($result)){ //loop through the rows echo '<tr>'; //loop through elements (ie td's) echo "<td>" . $row['member_name'] . "</td>"; } echo '</tr>'; echo '</table>'; mysql_close($link); ?> the output of this code is look like in HTML table:- .................................................. | Member detail | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | Andy | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | Anne | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | Ronni | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' but now the problem is that i want that if user click on Andy or any other name then the name of Andy come in the variable $mem_name for the next php page which will i use to show full detail of selected player what can i do to do this please help me
  19. Thanks photobucket it's working perfectly
  20. what is left join and its not working and only f_id which are similar in both tables like f_id from t1 has 101,102,103, 104,105 and f_id from t2 has 101,103,104 now i need ids only 101,103,104 with their f_name from t2
  21. how can i select multiple fields from multiple table in one query like i have table name t1 and t2 t1 fields are f_id,f_name,f_des t2 fields are f_id,ft_name,ft_des i need query which select f_id from both tables and f_name from table t1 where table t2 f_des=1 plz help me
  22. its working perfectly thanks you both of you and sincerely thanks to Leading Web Dev. thankss
  23. sorry i had posted twice and that's for sader)))))))) thanks you very much LeadingWebDev your previous script is working but now this script have a problem it's not picking mem_name value
  24. somehow it works it makes 8 combo box because rows was also 8
×
×
  • 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.