Jump to content
Killersites Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by madmhan84

  1. Good day & Happy Holidays I'd like to ask for a help on how to retain the values that I submitted using two buttons inside a table cell? This is the result when I click the two buttons in my form: This is the exact result I wanted (Note: Image below is just edited using a picture editor): This is the code that I used: <html> <head> <title>Sample </title> </head> <body> <table border = "1" align = "center" cellpadding = "10" > <form method = "post" action = "<?php echo $_SERVER['PHP_SELF']; ?>"> <tr> <td>Output1 : <?php if (isset($_POST['run1'])) { echo "<b>" .$_POST['input1']. "</b>"; } ?> </td> <td>Output2 : <?php if (isset($_POST['run2'])) { echo "<b>" .$_POST['input2']. "</b>"; } ?> </td> </tr> <tr> <td><input type = "text" name = "input1" value = "Type here..."></td> <td><input type = "text" name = "input2" value = "Type here..."></td> </tr> <tr> <td align = "center"><input type = "submit" name = "run1" value = "Button 1"></td> <td align = "center"><input type = "submit" name = "run2" value = "Button 2"></td> </tr> </form> </table> </body> </html>
  2. Thank you very much for replying! - How about if that .com website (by the other) and my .net website offers the same services or with similarties? Can they sue me even if I created my own contents? - I'd try an experiment on this one with hyphenated and non-hyphen website and the result is: a.) If I will write the "howtobuildwebsite.com" in the url bar it goes to this website: http://www.howtobuildwebsites.com/'>http://www.howtobuildwebsites.com/ b.) If I will write the "how to build websites" in the google search box and also in the address bar the first site that will be displayed is: how-to-build-websites.com (by Stef Mischook) .... and now I can't even see this site: http://www.howtobuildwebsites.com/ in the first 10 website google results - My question now is, Which one is better the one you type in the address/url bar or the one you type in the google search box when choosing for your domain name? - Is this implying that hyphenated domain names is better than those none? - How about sir the one that I've read is "Your website name should be your domain name?" Example: I would like to name my website as: Information for You! But the one I registered for my domain name is: info4u.com Is this Ok? Thanks again, and I'm sorry for my newbie questions!
  3. Thanks again for your time replying on this! I'm a bit familiar with WAMP because when I study about PHP basics I used WAMP But for the WordPress this will be my first time I've already received my Debit Card lately, the thing I'm thinking about now is my domain name , I'm confused in choosing my own domain name, hope you could give me some idea of it.. thanks again
  4. Hi, I'd just like to ask few questions about choosing domain names: 1.) Does .com, .net, .org matter when choosing domain names? 2.) What the difference between Hyphenated domain names in non-hyphenated? 3.) Do you have to name your website like the name of your company? Thanks
  5. Thank you very much for helping me, you are a great help to a first timer like me I will absolutely contact you if I'm going to start my website, from now I'm just applying for my debit card and still researching By the way, Can I use wordpress.org / freesite builder for the mean time until I made my own website? Again thanks!
  6. Thanks for replying Is it worth it to use Wordpress.org than the Free Site Builder provided by the web host that I've choose? Thanks again!
  7. Hi, thanks for replying! I mean I want my website to be like killersites.com that offers a lot (forum, blog, video store, university, library, webhosting, training) There are lot of questions popping into my mind about an online Business like: 1.) Do I need a webhosting company if I used wordpress to create my website? Because I've read some articles that if I used wordpress.com to host my blog/website I can't add a google adsense on it to earn? Reference: http://thebuckmaker.com/do-i-need-a-web-hosting-plan-for-my-own-wordpress-blog/ 2.) How and where will I start if I'm going to use this for business like: creating a paypal account register a domain name pay for my webhosting Thanks again!
  8. Good day to all! I don't know if this is the right section to ask or post this because I'm just a beginner. My questions is: Is it possible to create a website like killersites.com with WordPress? Thanks in advanced!
  9. Is there a way to reset the id field to follow the last number of the record instead of using the $count += 1; How? I'd try: TRUNCATE table symbols where id > 5; but it did'nt work! Thanks a lot!
  10. Country: Animal: <?php if (isset($_POST['submit'])) { $country = $_POST['country']; $animal = $_POST['animal']; $db = 'testdb'; $connection = mysql_connect('localhost','root','test'); mysql_select_db($db); mysql_query("INSERT INTO symbols (country, animal) VALUES('$country', '$animal')"); $query = "SELECT * FROM symbols ORDER BY id"; $result = mysql_query($query); if (mysql_num_rows($result) >0) { echo " while ($row = mysql_fetch_row($result)) { echo " echo " " .$row[0]. "";echo " " .$row[1]. "";echo " " .$row[2]. "";echo " ";} echo " ";} echo " "; echo mysql_num_rows($result) . " Total No. of Records"; mysql_free_result($result); mysql_close($connection); } ?>
  11. Thanks a lot for the info!
  12. Nope, its still working even without adding the PHP directory to the windows path... that's why I'm wondering why it is still needed? thanks...
  13. I'm sorry if it is a silly one! But I'm just curious... and I want to try it manually.... people these days become more lazy because of these technologies and not knowing how things work... too bad sometimes one of them! but I think its still much better to know why... peace!!!
  14. Good day! I tried to install Apache, PHP and MySQL manually, I mean without using xampp or wamp But my question is: Is it necessary to add my PHP directory to the path of Windows (Environment Variables)? Why?
  15. Sir Stef and Sir Benj thank you very much!!!
  16. dude if you're new to PHP try this: http://www.killerphp.com/
  17. I created a database named testdb, and a table named symbols in phpmyadmin here's the code: CREATE TABLE `symbols` ( `id` int(11) NOT NULL auto_increment, `country` varchar(255) NOT NULL default '', `animal` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM; INSERT INTO `symbols` VALUES (1, 'America', 'eagle'); INSERT INTO `symbols` VALUES (2, 'China', 'dragon'); INSERT INTO `symbols` VALUES (3, 'England', 'lion'); INSERT INTO `symbols` VALUES (4, 'India', 'tiger'); INSERT INTO `symbols` VALUES (5, 'Australia', 'kangaroo'); INSERT INTO `symbols` VALUES (6, 'Norway', 'elk'); I used to display it in my browser using the PHP code: <?php $db = "testdb"; $connection = mysql_connect('localhost','root',''); mysql_select_db('testdb'); $query = "SELECT * FROM symbols"; $result = mysql_query($query); if (mysql_num_rows($result) >0) { echo " while ($row = mysql_fetch_row($result)) { echo " echo " " .$row[0] ."";echo " " .$row[1] ."";echo " " .$row[2] ."";echo " ";} echo " ";} mysql_free_result($result); mysql_close($connection); ?> .......And it works fine BUT..... (here's my problem) I want to insert a record that's not define in MySQL or in phpMyAdmin here's the code that i make but does not working and i get the error message: Parse error: parse error in D:\Program Files\wamp\www\test.php on line 12 <?php $db = "testdb"; $connection = mysql_connect('localhost','root',''); mysql_select_db('testdb'); //HERE'S THE CODE THAT I ADD mysql_query("INSERT INTO symbols (id, country, animal) VALUES ('7', 'Africa', 'zebra'))"; $query = "SELECT * FROM symbols"; $result = mysql_query($query); if (mysql_num_rows($result) >0) { echo " while ($row = mysql_fetch_row($result)) { echo " echo " " .$row[0] ."";echo " " .$row[1] ."";echo " " .$row[2] ."";echo " ";} echo " ";} mysql_free_result($result); mysql_close($connection); ?> Hope someone could help me... THANKS A LOT!
  18. madmhan84

    LOOP and ARRAY

    Sir/Mam: I'm expermenting in the loop and array but.... how do i make a for loop items/numbers to become an array items/numbers... i mean it's just like this... <?php echo "DISPLAY THE LOOP NUMBERS "; $multiplier = 5; for($number=1; $number<=10; $number++) { $answer = $number * $multiplier; echo $answer. ' '; } // I assign a variable to hold the array $result = array($answer); echo " "; echo "DISPLAY THE ARRAY FROM LOOP "; // I want to display the array foreach ($result as $display_numbers) { echo $display_numbers; } ?> BUT IT JUST DISPLAY 50 in the end... not the numbers that I'm expecting like (5,10,15,20,25,30,35,40,45,50) All replies are appreciated! Thanks a lot!
  • Create New...