Web Analytics Made Easy -
StatCounter I just get a blank screen ! - CodingForum

Announcement

Collapse
No announcement yet.

I just get a blank screen !

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I just get a blank screen !

    I can not understand what I have done wrong !

    The following script just creates some tables.

    It just produced a blank screen, so I put in some echo
    statements to track the progress.

    So I should be getting:
    Hi there
    Hello
    Hello, connected
    etc etc

    Amazingly I still don't get any output !

    Just a blank screen

    What can be wrong ?

    PHP Code:
    <?php 
    /*  pay_tab_create.php
    *  Builds database
    */

    echo "Hi there<br>";
    exit();

    require_once(
    "Letter33.php");

    echo 
    "Hello";

    $connection mysql_connect($host,$user,$password)  
    or die (
    "Couldn't connect to server.");

    echo 
    "<br>Hello, connected";

    /* REMOVE THIS IF DATABASE ALREADY EXISTS
    */

    $db mysql_select_db($database$connection)
     or die (
    "Couldn't select the database." mysql_error());  

    echo 
    "<br>Hello, selected database";


    $sql "CREATE TABLE `clients` (
      `confirm` char(1) NOT NULL default '',
        `type` char(1) NOT NULL default '',
      `contact` varchar(25) NOT NULL default '',
      `email` varchar(40) NOT NULL default '',
      `pass` varchar(255) NOT NULL default '',
        `ref_count` int(3) default '0',
      `create_date` int(12) default NULL,
      `last_date` int(12) default NULL,
      `refd_by_name` char(25) NOT NULL default 'none',
        `refd_by_email` varchar(40) NOT NULL default 'none',
      KEY `email` (`email`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1"
    ;

    $result mysql_query($sql)
        or die(
    "could not CREATE clients");

    echo 
    "Created clients Table <br>";



    Below is the SQL syntax for creating the tables used in the PHP/MySQL script
    # Table structure for table `paypal_cart_info` 

    $sql "CREATE TABLE `paypal_cart_info` (
     `txnid` varchar(30) NOT NULL default '',
      `itemname` varchar(255) NOT NULL default '',
         `itemnumber` varchar(50) default NULL,
          `os0` varchar(20) default NULL,
             `on0` varchar(50) default NULL,
              `os1` varchar(20) default NULL,
                 `on1` varchar(50) default NULL,
                  `quantity` char(3) NOT NULL default '',
                     `invoice` varchar(255) NOT NULL default '',
                      `custom` varchar(255) NOT NULL default '' )
                         ENGINE=MyISAM DEFAULT CHARSET=latin1"
    ;

    $result mysql_query($sql)
        or die(
    "could not paypal_cart_info clients");

    echo 
    "Created paypal_cart_info Table <br>";
     
                         
                         
    # Table structure for table `paypal_subscription_info` 
    $sql "CREATE TABLE `paypal_subscription_info` (
     `subscr_id` varchar(255) NOT NULL default '',
      `sub_event` varchar(50) NOT NULL default '',
         `subscr_date` varchar(255) NOT NULL default '',
          `subscr_effective` varchar(255) NOT NULL default '',
             `period1` varchar(255) NOT NULL default '',
              `period2` varchar(255) NOT NULL default '',
                 `period3` varchar(255) NOT NULL default '',
                  `amount1` varchar(255) NOT NULL default '',
                     `amount2` varchar(255) NOT NULL default '',
                      `amount3` varchar(255) NOT NULL default '',
                         `mc_amount1` varchar(255) NOT NULL default '',
                          `mc_amount2` varchar(255) NOT NULL default '',
                             `mc_amount3` varchar(255) NOT NULL default '',
                              `recurring` varchar(255) NOT NULL default '',
                                 `reattempt` varchar(255) NOT NULL default '',
                                  `retry_at` varchar(255) NOT NULL default '',
                                     `recur_times` varchar(255) NOT NULL default '',
                                      `username` varchar(255) NOT NULL default '',
                                         `password` varchar(255) default NULL,
                                          `payment_txn_id` varchar(50) NOT NULL default '',
                                             `subscriber_emailaddress` varchar(255) NOT NULL default '',
                                              `datecreation` date NOT NULL default '0000-00-00' )
                                                 ENGINE=MyISAM DEFAULT CHARSET=latin1"
    ;

    $result mysql_query($sql)
        or die(
    "could not paypal_subscription_info clients");

    echo 
    "Created paypal_subscription_info Table <br>";
     
                                                 
    # Table structure for table `paypal_payment_info` 
    $sql "CREATE TABLE `paypal_payment_info` (
     `firstname` varchar(100) NOT NULL default '',
      `lastname` varchar(100) NOT NULL default '',
         `buyer_email` varchar(100) NOT NULL default '',
          `street` varchar(100) NOT NULL default '',
             `city` varchar(50) NOT NULL default '',
              `state` char(3) NOT NULL default '',
                 `zipode` varchar(11) NOT NULL default '',
                  `memo` varchar(255) default NULL,
                     `itemname` varchar(255) default NULL,
                      `itemnumber` varchar(50) default NULL,
                         `os0` varchar(20) default NULL,
                          `on0` varchar(50) default NULL,
                             `os1` varchar(20) default NULL,
                              `on1` varchar(50) default NULL,
                                 `quantity` char(3) default NULL,
                                  `paymentdate` varchar(50) NOT NULL default '',
                                     `paymenttype` varchar(10) NOT NULL default '',
                                      `txnid` varchar(30) NOT NULL default '',
                                         `mc_gross` varchar(6) NOT NULL default '',
                                          `mc_fee` varchar(5) NOT NULL default '',
                                             `paymentstatus` varchar(15) NOT NULL default '',
                                              `pendingreason` varchar(10) default NULL,
                                                 `txntype` varchar(10) NOT NULL default '',
                                                  `tax` varchar(10) default NULL,
                                                     `mc_currency` varchar(5) NOT NULL default '',
                                                      `reasoncode` varchar(20) NOT NULL default '',
                                                         `custom` varchar(255) NOT NULL default '',
                                                          `country` varchar(20) NOT NULL default '',
                                                             `datecreation` date NOT NULL default '0000-00-00' )
                                                              ENGINE=MyISAM DEFAULT CHARSET=latin1"
    ;

    $result mysql_query($sql)
        or die(
    "could not paypal_payment_info ");

    echo 
    "Created paypal_payment_info Table <br>";
     
    ?>
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Originally posted by jeddi View Post
    Amazingly I still don't get any output !
    what output do you expect, I don't see anything wrong, it's normal in my opinion.

    best regards

    Comment


    • #3
      The line

      Code:
      Below is the SQL syntax for creating the tables used in the PHP/MySQL script.
      in what you posted is causing a syntax error which is why you're getting a blank page. Make it a comment or remove it.
      Dave .... HostMonster for all of your hosting needs

      Comment


      • #4
        Thank you

        It was driving me nuts !

        Just could not see it !

        I removed the exit() and entered a hash before that
        line you mentioned.

        All tables set-up
        If you want to attract and keep more clients, then offer great customer support.

        Support-Focus.com. automates the process and gives you a trust seal to place on your website.
        I recommend that you at least take the 30 day free trial.

        Comment


        • #5
          You should be developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your php.ini (stop and start your web server to get any change made to php.ini to take effect) so that fatal parse errors are displayed.

          People waste a huge amount of time wondering why their code does not run, when turning on full php error reporting will tell you why most of the time.
          Last edited by CFMaBiSmAd; Apr 14, 2009, 08:59 AM.
          Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.

          Comment


          • #6
            Originally posted by CFMaBiSmAd View Post
            You should be developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your php.ini (stop and start your web server to get any change made to php.ini to take effect) so that fatal parse errors are displayed.

            People waste a huge amount of time wondering why their code does not run, when turning on full php error reporting will tell you why most of the time.
            Or do what i do and develop on IIS and FastCGI - this halts on all errors even if notices so your code becomes very clean the only problem is when running Linux only scripts which there aren't many.
            Working towards a Internet where we don't have website just browser applications Kill the Hyper-link and say hello to 3D Games in the browser :)

            Comment


            • #7
              Thanks for those comments.

              I usually do run with errors on,
              but I just went back to this older project that didn't have them
              turned on.

              I was surprised tha I didn't get an error! I thought there was no error
              just wrongly coded !!!

              So that was a useful reminder you gave me !!

              Thanks
              If you want to attract and keep more clients, then offer great customer support.

              Support-Focus.com. automates the process and gives you a trust seal to place on your website.
              I recommend that you at least take the 30 day free trial.

              Comment

              Working...
              X