Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1

    Unhappy [help]newbie sa php


    ngayo unta ko ninyo idea..newbie pa ko aning php gamit nako nga free web host kay host1free.com then ako gi testingan ni nga code

    Code:
    <?php
    
    error_reporting(0);
    
    $connect = mysql_connect("localhost","usename","password") or die(mysql_error());
    mysql_select_db("databasename") or die (mysql_error);
    
    echo "Connected!";
    ?>
    ako problema kai dli man mogawas ang Connected..wla gyud nakasuwat nga error..
    ask lang unta ko kung kinsa gamit ani nga webhosting mogana ba php ani nya?
    Salamat

  2. #2

    Default Re: [help]newbie sa php

    Since newbie pa ka sa php, try this php code instead:

    Code:
    <?php
    echo "test";
    ?>
    If mu-display xag "test", working imung php. If dili "test" ang i-display, dli working imung php sa imung web host.

  3. #3

    Default Re: [help]newbie sa php

    instead of this
    Code:
    <?php  error_reporting(0);  $connect = mysql_connect("localhost","usename","password") or die(mysql_error()); mysql_select_db("databasename") or die (mysql_error);  echo "Connected!"; ?>
    try this

    Code:
    <?php  error_reporting(0);  $connect = mysql_connect("localhost","username","password") or die(mysql_error()); mysql_select_db("databasename") or die (mysql_error);  echo "Connected!"; ?>
    kasagaran man gd rn sa mga hosting site kay i configure jd nimo tagsa2.

  4. #4

    Default Re: [help]newbie sa php

    Quote Originally Posted by intheb0x View Post
    ngayo unta ko ninyo idea..newbie pa ko aning php gamit nako nga free web host kay host1free.com then ako gi testingan ni nga code

    Code:
    <?php
    
    error_reporting(0);
    
    $connect = mysql_connect("localhost","usename","password") or die(mysql_error());
    mysql_select_db("databasename") or die (mysql_error);
    
    echo "Connected!";
    ?>
    ako problema kai dli man mogawas ang Connected..wla gyud nakasuwat nga error..
    ask lang unta ko kung kinsa gamit ani nga webhosting mogana ba php ani nya?
    Salamat
    Actually, ang problema ana is naay error imo code. Wala nko gi test but I'm thinking kanang die(mysql_error) ang culprit. mysql_error is not a function or a proper variable. It is a bad parameter, therefore, error.

    Walay nakasuwat sa imo page simply because imo mn gi disable ang pag display sa errors. (error_reporting(0)).

    Quote Originally Posted by neigyl
    If mu-display xag "test", working imung php. If dili "test" ang i-display, dli working imung php sa imung web host.
    Ayaw nlng libog-liboga ang newbie. Obviously, PHP is enabled ani na hosting service. The fact na blank ang iya page and wala gi display ang code means gi interpret ang PHP. If imo gitan-aw ang code makita nmu nga error_reporting, so and so forth.

    @Axis- Brader, I think you posted the same code twice. Or I think I'm missing something.

  5. #5

    Default Re: [help]newbie sa php

    Quote Originally Posted by kamahak View Post
    Actually, ang problema ana is naay error imo code. Wala nko gi test but I'm thinking kanang die(mysql_error) ang culprit. mysql_error is not a function or a proper variable. It is a bad parameter, therefore, error.

    Walay nakasuwat sa imo page simply because imo mn gi disable ang pag display sa errors. (error_reporting(0)).


    Ayaw nlng libog-liboga ang newbie. Obviously, PHP is enabled ani na hosting service. The fact na blank ang iya page and wala gi display ang code means gi interpret ang PHP. If imo gitan-aw ang code makita nmu nga error_reporting, so and so forth.

    @Axis- Brader, I think you posted the same code twice. Or I think I'm missing something.
    My idea was: The fact nga bag-o pa xag php is for ts not to deal with mysql foos yet. Also, some free web hosts have their php enabled but was not properly configured. Thanks for the assessment.

  6. #6

    Default Re: [help]newbie sa php

    @kamahak : check the parameters sir. usename and username are different.

  7. #7

    Default Re: [help]newbie sa php

    @Axis-- Ahh, ok. Karon rapod ko ka bantay nga 'username' and 'password' ang iya gigamit sa iya code. String dli variable. I doubt na kbaw na cya mu-ilis sa default 'root' na username sa mysql. Hehe.

    So, part pd na sa error. Ang sakto tingai na first step dri kay dli niya i-disable ang error_reporting. Pra makita jd kung unsa first na blema.

    @TS-- Wa mn nmu sabta ang code gd. Copy Paste rmn ka drecho.

  8. #8

    Default Re: [help]newbie sa php

    @kamahak : murag copy paste ra cguro ni. wa nya tan.awa ang mga parameters.
    @TS :try to understand the code first before implementing it.

    mas nindot if n.anion nimo

    <?php

    $host = "your_host_here";
    $username = "your_username_here";
    $password = "your_password_here";

    $connect = mysql_connect($host,$username,$password) or die(mysql_error());
    mysql_select_db("databasename") or die (mysql_error);

    ?>

    that will do the work

  9. #9

    Default Re: [help]newbie sa php

    what about sa save,delete,edit,retrieve and search unsa on mga bro ...im welling to learn sad newbie sad ko ani?

  10. #10

    Default Re: [help]newbie sa php

    Quote Originally Posted by skeptic_rob View Post
    what about sa save,delete,edit,retrieve and search unsa on mga bro ...im welling to learn sad newbie sad ko ani?
    You mean to/from database? or to/from desktop?

    If you mean database:

    (1) Save -- and u're using mysql to access database thru php, use :
    mysql_query("INSERT INTO user_table (name, age) VALUES ('skeptic_rob', 30)");

    (2) Delete:
    mysql_query("DELETE FROM user_table WHERE name='skeptic_rob'");

    (3) Edit
    mysql_query("UPDATE user_table SET age=31 WHERE name='skeptic_rob'");

    (4) Retrieve & Search
    mysql_query("SELECT * FROM user_table WHERE name='skeptic_rob'");


    If you mean functions in accessing from you desktop:
    I recommend javascript for these (pop-up dialog boxes, etc) and use the above for storing/retrieving/etc

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Replies: 0
    Last Post: 03-13-2013, 01:20 AM
  2. help..newbie sa photography
    By j.u.n.a.x in forum Photography
    Replies: 1
    Last Post: 08-19-2012, 10:09 PM
  3. help me in php, am a newbie
    By maue in forum Programming
    Replies: 21
    Last Post: 06-15-2009, 10:37 AM
  4. help! Password sa Bios wala ko Kbaw!
    By kerlwinph in forum Computer Hardware
    Replies: 18
    Last Post: 08-13-2006, 06:21 PM
  5. help po sa on pag attach og picture
    By pinkit in forum Computer Hardware
    Replies: 2
    Last Post: 07-16-2006, 09:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top