
jaiffed
Members-
Posts
41 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Male
-
Location
India
jaiffed's Achievements

Member (2/5)
0
Reputation
-
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
-
thanx possien your worked header("Location: dream.html"); after remove the echo $xml_output; great person thnx a lot.
-
header("Location:dream.html"); not working...
-
this is my file which make graph from saved .xml file change its ext .txt to .html [attachment deleted by admin]
-
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
-
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.
-
No, I am getting from mysql into array
-
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
-
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);
-
yes i want to save as a .xml file & thanks u so much thiswork
-
i want xml file in ths format <graph> <set name='Jan' value='17400' hoverText='January'/> </graph>
-
im having error in this $db = new MySQLi( 'localhost','root','12345','rlist' );
-
echo $xml_output .= saveXML(); $xml_output .= save("write.xml") i found this but its not working
-
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
-
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"; } ?>