Jump to content

gravereaper

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by gravereaper

  1. I don't know how to execute phpMyAdmin on my server.
  2. I know how to create on web hosts but don't know how to create a database on my own PC. I'am using XAMPP lite so have php,mysql,apache server and phpmyadmin all installed already. So how will i exactly create a database for one of the pre-made scripts i'am trying to run on my PC.
  3. I'am developing a PHP powered site right now, but is it possible to use PHP codes in .html files so they can be crawled by search engine crawlers? And if its not possible, then how are those php site indexed by search engines?
  4. For my visitors, site is opening fine here and its name server change is probarly completed by now so you can view it. I've already used popups, you'll get a better understanding when you see it in action, in the site.
  5. How can we make random selections in PHP? like a HTML link, when clicked by a user redirects him to one page out of 5 pages, randomly. For examples theres a HREF text link and selection of five pages ( page1.html,page2.html.... ), now when a user clicks on that active link he is redirected randomly to one of those pages.
  6. www.webwint.com/services.html , try the buy now features through FireFox and then try it through Internet Explorer. A Links gets inactive in that popup windows when using FireFox and even with the target="_blank", instead of popping up a separate window it opens up the new site in the same window, just in a new tab. How can i fix this?
  7. Ok now its appearing in every Text Reader but still when i try to read it through the above script its showing everything in a horizontal lineContents of the actual .txt file:text 1text2When read in the browser:text 1 text2
  8. I'am putting the codes right but there seems to be a problem.. i'am using the following codes to write to the file: <?php$myFile = "testfile.txt";$fh = fopen($myFile, 'w');$datastring = "text 1\n";fwrite($fh,$datastring);$datastring = "text2\n";fwrite($fh,$datastring);fclose($fh);?> and the following to read it: <?php$myFile = "testfile.txt";$fh = fopen($myFile, 'r');$theData = fread($fh, filesize($myFile));fclose($fh);echo $theData;?> But instead of separate lines, its displaying the file contents in the same line, thats what i was trying to figure out..
  9. Which variable do i need to edit for that and where is that variable located?EDIT: Ok i've found the my.cnf configuration file, now which variable shall i edit to avoid getting this error.
  10. Its writing in the .txt file fine now, how can i read all the contents of the file from the first to the last line?
  11. gravereaper

    MySQL Problem

    'Warning: mysql_connect() [function.mysql-connect]: Host 'MYHOST is not allowed to connect to this MySQL server in D:\xampplite\htdocs\test\hi.php on line 2Could not connect: Host 'MYHOST' is not allowed to connect to this MySQL server' When i try to execute the following code: <?php$con = mysql_connect("rehan","Root"," ");if (!$con) { die('Could not connect: ' . mysql_error()); }// Create databaseif (mysql_query("CREATE DATABASE my_db",$con)) { echo "Database created"; }else { echo "Error creating database: " . mysql_error(); }// Create table in my_db databasemysql_select_db("my_db", $con);$sql = "CREATE TABLE Person (FirstName varchar(15),LastName varchar(15),Age int)";mysql_query($sql,$con);mysql_close($con);?> Need help to bypass this..
  12. Ok those symbols were only appearing in NOTEPAD, the text was on separate lines when i tried opening .txt file in wordpad.
  13. Still the same thing, one thing i'll like to add is that whenever i try to copy and paste that text with those symbols here, the text automatically appears on separate lines. Any hints on how to read it?
  14. $myFile = "testFile.txt";$fh = fopen($myFile, 'w') or die("can't open file");$stringData = "Bobby Bopper\n";fwrite($fh, $stringData);$stringData = "Tracy Tanner\n";fwrite($fh, $stringData);fclose($fh); This code should simply write the two names on different lines but instead of a line break its displaying a character normally used a symbol for line break. How can i read this txt file so that character is considered as an actual line break and the two names appear on different lines?
×
×
  • Create New...