Jump to content

madmhan84

Member
  • Posts

    20
  • Joined

  • Last visited

  • Days Won

    1

Posts 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:
    output1.jpg

    This is the exact result I wanted (Note: Image below is just edited using a picture editor):
    output2.jpg

    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! :)

     

    1. .com is the most common and preferred but I don't think it matters from a SEO perspective. One thing you might want to be careful of is that if you use a domain extension that is NOT .com you will need to check the .com site of the same name because you could be providing info or products for you site while the other site is doing something else that might be inappropriate. You don't want your client to accidently enter the wrong extension ending on a site that may be offensive to them even though it's not your site. Also, check the domain history before registering. Some domains have a bad history.

     

    - 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?

     

     

    2. Hyphenated domains is not a problem from the SEO perspective. What you should be the deciding factor is how the domain name is translated from person to person. If you have a domain called www.youcandoit.com you can simply give you address to another person by saying: "You Can Do It dot com". Most people will not have a problem in remembering or writing it down. Now if you have hypens in that same domain which would look like this: www.you-can-do-it.com you would end up saying it like this: "You hyphen Can hyphen Do hyphen It dot com". See my point? So the questions you ask yourself are: How easy was it for you to tell them the url? How easy was it for them to remember or write it down?

     

    - 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 :blink:

     

    - 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?

     

     

    3. No. You can do whatever you like so long it makes sense. For instance, there is a church called HighPoint Church but the domain they use is www.churchunusual.com

     

    - 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! :P

  3. I do not know never used it. But you could go and download wamp or mamp. They are a server for your computer, I use mamp. Wamp has had problems on windows 7 do not know if they have fixed it yet. I now do all my work on a mac book pro as I do not hace a pc anymore. I do check my work on my wife's laptop although because sometimes there are problems you have to fix between mac and windows.

     

    But anyway back to topic. Wamp is a what is called a local server. You download it then you can install WordPress on you pc or mac. You will also need it if you do not use WordPress and just have a site that has php files. How it works is after you download Wamp you install WordPress, or make your root folder in the htdocs folder for a none WordPress site. I make a shortcut on my desktop for easy access. Oops backup before you install WordPress you have to make a database using phpmyadmin.

     

    This way you can experiment with WordPress without going live.

     

    Thanks again for your time replying on this! :D

     

    I'm a bit familiar with WAMP because when I study about PHP basics I used WAMP :P

    But for the WordPress this will be my first time :bash:

     

    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 B)

  4. I do not know, never used them. I just have a web host, mine is Hostgator but I here Ipage is very good also. Again do not use Godday for word press. I just download word press and install it on my web host. First you have to make a database on your hosting server. Then follow the instructions to install your wordpress site.

     

    I will be happy to walk you through this. It is simple once you do it once. You can get my email in my profile. I am on my computer most every day. If you do not have Skype download it or we can use gmail so we can chat as I help you upload word press to your server. If you go with that method.

     

     

    Thank you very much for helping me, you are a great help to a first timer like me :D

    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 :P

     

    By the way, Can I use wordpress.org / freesite builder for the mean time until I made my own website?

     

    Again thanks! B)

  5. Start at wordpress.org all the info you are looking for. You will need at least a basic understanding of PHP. Learn what a child theme is and make one. Do not use Godaddy for hosting. Install one plugin at a time then go through site and make sure it still works. Some plugins do not play well with others.

     

    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!

  6. In general, I'd say 'yes' - but Killersites is very complex. There is this forum, the university, the tutorial sites. Parts of it are actually done in Wordpress.

    What features precisely are you referring to?

     

    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?

     

    The self-hosted solution for WordPress Blogs is far more flexible, than the one which is offered by WordPress and others. But not only the plus of flexibility and the freedom of choice in case of designing your blog are great pros for the solution based on self-hosting. With this solution you also have the chance to earn some money. It is not allowed to advertise for your own revenue on free blogs, but with your own WordPress Blog you can benefit from Google’s Adsense, Yahoo’s advertising and also from affiliate programs.

    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!

  7. Just to be clear, the code above doesn't make any change to the database itself -- it just adds a counter that gets incremented when the country and animal values are displayed.

     

     

    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!

  8.  

    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);

    }

    ?>

     

     

  9. Perhaps a silly question, but why bother doing this all manually? WAMP takes care of all of that for you -- you can have the server set up and ready to work with within about ten minutes?

     

    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!!! :D

  10. 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?

  11. 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!

  12. 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...