Page 1 of 5 1234 ... LastLast
Results 1 to 10 of 50
  1. #1

    Default need help on php!


    Hi guys,

    I need help sa php.. ako problema dli ko maka connect sa akong database (MySQL) mo error siya.. tas if nag koi textfield sa usa ka page.. then if mo click ko'g submit button inig next page dapat unsa tong data sa akong previous page dapat mo carry siya sa next page upon clicking sa submit button.. sorry noob question ko.. ala keo ko idea PHP gud..

    ps: fully designed na siya.. saving nalang kulang..

    regards,

    syntax

  2. #2

    Default Re: need help on php!

    Quote Originally Posted by syntax20075 View Post
    Hi guys,

    I need help sa php.. ako problema dli ko maka connect sa akong database (MySQL) mo error siya.. tas if nag koi textfield sa usa ka page.. then if mo click ko'g submit button inig next page dapat unsa tong data sa akong previous page dapat mo carry siya sa next page upon clicking sa submit button.. sorry noob question ko.. ala keo ko idea PHP gud..

    ps: fully designed na siya.. saving nalang kulang..

    regards,

    syntax
    For PHP - MySQL problem

    try to create "info.php" with this code
    Code:
    <?php 
    
    phpinfo();
    
    ?>
    save it on your WWW folder.
    navigate to it using your browser.
    then check if you have MYSQL for PHP installed.
    (I don't know sa windows kung automatic apil, I'm using Ubuntu)

    Kanang ma-carry ang information imu kelangan,
    either imu i-save sa $_SESSION or $_POST, which is secure, di ma-kit.an..

    if ganahan ka'g makit.an sa ADDRESS Bar example,
    www.istorya.net/forums/index.php&uname=syntax&pword=gwapoko

    gamit ka og $_GET.

    For more information, adto sa W3Schools Online Web Tutorials

  3. #3

    Default Re: need help on php!

    copy your code and the error here... we'll help...

  4. #4

    Default Re: need help on php!

    salamat sa reply..

    wla man gyud keo ko idea sa php gud.. nag practice rako.. cge ako suwayan...

  5. #5

    Default Re: need help on php!

    Quote Originally Posted by webdreamer View Post
    copy your code and the error here... we'll help...
    mao ni ang code sa previous page:


    <div id="formPan">
    <h2 class="style2">RESERVATION FORM </h2>

    <form method="post" action="availability.php" name="index" onsubmit="return validateForm()">
    <div style="margin-top:20px; margin-left:10px;">
    <table width="186" border="0">
    <tr>
    <td width="69"><div align="right">
    <label>Start Date : </label>
    </div></td>
    <td width="101"><input type="text" class="test1" name="start" id="sd" value="" maxlength="10" readonly="readonly" /></td>
    </tr>
    <tr>
    <td><div align="right">
    <label>End Date : </label>
    </div></td>
    <td><input type="text" class="test" name="end" id="ed" value="" maxlength="10" readonly="readonly" /></td>
    </tr>
    <tr>
    <td><div align="right">
    <label>Adult : </label>
    </div></td>
    <td><select name="adult" class="ed" >
    <option>1</option>
    <option>2</option>
    <option>3</option>
    </select></td>
    </tr>
    <tr>
    <td><div align="right">
    <div align="right">
    <label>Child : </label>
    </div>
    </div></td>
    <td><select name="child" class="ed">
    <option>0</option>
    <option>1</option>
    <option>2</option>
    </select></td>
    </tr>
    <tr>
    <td><div align="right"></div></td>
    <td><input name="Input" type="submit" value="Check Availability" id="button" /></td>
    </tr>
    <tr>
    <td colspan="2"><div align="right"><a rel="facebox" href="modifyindex.php">Modify</a> / <a href="cancelindex.php">Cancel</a> Reservation </div></td>
    </tr>
    </table>
    </div>
    </form>
    </div>


    inig click nako ani: <input name="Input" type="submit" value="Check Availability" id="button" /> mo next page siya.. tas katong akong gpang filled.in sa kaini nga preview makita ra japon nako sa, availablity.php nga page (which ang nxt page)

  6. #6

    Default Re: need help on php!

    bro, maka login na ka sa SQL?
    ikaw ra ga himo ani bro?

    follow these examples found on this site.. W3Schools Online Web Tutorials

    Save the files on the following filenames:

    Filename: first.php
    Code:
    <form action="welcome.php" method="post">
    
    Name: <input type="text" name="fname" />
    Age: <input type="text" name="age" />
    
    <input type="submit" />
    
    </form>

    Filename: welcome.php
    Code:
    Welcome <?php echo $_POST["fname"]; ?>!<br />
    You are <?php echo $_POST["age"]; ?> years old.
    After saving these codes, run first.php.

  7. #7

    Default Re: need help on php!

    Quote Originally Posted by syntax20075 View Post
    Hi guys,


    I need help sa php.. ako problema dli ko maka connect sa akong database (MySQL) mo error siya.. tas if nag koi textfield sa usa ka page.. then if mo click ko'g submit button inig next page dapat unsa tong data sa akong previous page dapat mo carry siya sa next page upon clicking sa submit button.. sorry noob question ko.. ala keo ko idea PHP gud..


    ps: fully designed na siya.. saving nalang kulang..


    regards,


    syntax
    problem with connecting sa database?


    Code:
    define('DB_SERVER', 'localhost');
    define('DB_USERNAME', 'root');
    define('DB_PASSWORD', '');
    define('DB_DATABASE', 'test1');
    
    $connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die('Oops connection error -> ' . mysql_error());
    mysql_select_db(DB_DATABASE, $connection) or die('Database error -> ' . mysql_error());
    gamit ra ka og POST or GET like sa ge post ni stealth.

    pra mkuha nimo ang data nga imong ge input.
    Last edited by boang3000; 09-21-2012 at 10:03 AM.

  8. #8

    Default Re: need help on php!

    Quote Originally Posted by stealthghost View Post
    bro, maka login na ka sa SQL?
    ikaw ra ga himo ani bro?

    follow these examples found on this site.. W3Schools Online Web Tutorials

    Save the files on the following filenames:

    Filename: first.php
    Code:
    <form action="welcome.php" method="post">
    
    Name: <input type="text" name="fname" />
    Age: <input type="text" name="age" />
    
    <input type="submit" />
    
    </form>

    Filename: welcome.php
    Code:
    Welcome <?php echo $_POST["fname"]; ?>!<br />
    You are <?php echo $_POST["age"]; ?> years old.
    After saving these codes, run first.php.
    bro, akong g try imong g post.. pro ang mo gawas sa welcome.php nga page kai kini siya:

    Welcome <?php echo $_POST["fname"]; ?>!<br />
    You are <?php echo $_POST["age"]; ?> years old.

    exactly nga kana..

    dli siya mahimong:

    Welcome stealthghost!
    You are 21 years old.

  9. #9

    Default Re: need help on php!

    @boang3000, uu akong g try

    mao ni akong first page:
    Code:
    <div id="formPan">
    
    <form method="post" action="secondpage.php" name="index" onsubmit="return validateForm()">
    <div style="margin-top:20px; margin-left:10px;">
     <table width="186" border="0">
      <tr>
        <td width="69"><div align="right">
          <label>Start Date : </label>
        </div></td>
        <td width="101"><input type="text" class="w8em format-d-m-y highlight-days-67 range-low-today" name="start" id="sd" value="" maxlength="10" readonly="readonly" /></td>
      </tr>
      <tr>
        <td><div align="right">
          <label>End Date : </label>
        </div></td>
        <td><input type="text" class="w8em format-d-m-y highlight-days-67 range-low-today" name="end" id="ed" value="" maxlength="10" readonly="readonly" /></td>
      </tr>
      <tr>
        <td><div align="right">
          <label>Adult : </label>
        </div></td>
        <td><select name="adult" class="ed" >
          <option>1</option>
          <option>2</option>
          <option>3</option>
        </select></td>
      </tr>
      <tr>
        <td><div align="right">
          <div align="right">
            <label>Child : </label>
          </div>
        </div></td>
        <td><select name="child" class="ed">
          <option>0</option>
          <option>1</option>
          <option>2</option>
        </select></td>
      </tr>
      <tr>
        <td><div align="right"></div></td>
        <td><input name="Input" type="submit" value="Check Availability" id="button" /></td>
      </tr>
      <tr>
        <td colspan="2"><div align="right"><a rel="facebox" href="modifyindex.php">Modify</a> / <a href="cancelindex.php">Cancel</a> Reservation </div></td>
        </tr>
    </table> 
     </div>    
    </form>
    </div>
    second page:
    Code:
    <?php
    
    	/*$arival = $_POST['start'];
    	$departure = $_POST['end'];
    	$adults =  $_POST['adult'];
    	$child = $_POST['child'];*/
    ?>
    
    <div id="services">
    <h2><strong>RESERVATION DETAILS</strong></h2>
    <p>
      <ul>
          Check In Date :<?php echo $arival; ?><br />
          Check Out Date :<?php echo $departure; ?>  <br />
    	  Adults : <?php echo $adults; ?><br />
    	  Child :<?php echo $child; ?><br />
    	  
     </ul>
        </p>
    </p>
    </div>
    ako man gud barkada nag buhat ani, kaso wla siya karon..

  10. #10

    Default Re: need help on php!

    Quote Originally Posted by syntax20075 View Post
    bro, akong g try imong g post.. pro ang mo gawas sa welcome.php nga page kai kini siya:

    Welcome <?php echo $_POST["fname"]; ?>!<br />
    You are <?php echo $_POST["age"]; ?> years old.

    exactly nga kana..

    dli siya mahimong:

    Welcome stealthghost!
    You are 21 years old.
    Can you click this site? -> http://localhost

    if wala'y ingon ani sa ubos nakabutang, then wala pa ka'y webserver..

    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.
    do you have a XAMPP? Install the software from this site. -> apache friends - xampp

  11.    Advertisement

Page 1 of 5 1234 ... LastLast

Similar Threads

 
  1. Need help on PHP
    By Badekdek in forum Programming
    Replies: 8
    Last Post: 01-26-2009, 09:19 PM
  2. Need help on PHP
    By Badekdek in forum Programming
    Replies: 1
    Last Post: 01-20-2009, 07:54 AM
  3. Need help on PHP
    By Badekdek in forum Networking & Internet
    Replies: 0
    Last Post: 01-19-2009, 11:25 PM
  4. needs help on HTML
    By tagaisla in forum Websites & Multimedia
    Replies: 11
    Last Post: 11-16-2005, 03:32 AM
  5. I need help on CPU Air flow suggestions
    By HLadik2 in forum Computer Hardware
    Replies: 8
    Last Post: 09-12-2005, 05:20 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