Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14

Thread: my sql

  1. #1
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts

    my sql

    Warning: mysql_select_db() expects parameter 2 to be resource, null given in aloootcom/8.php on line 34 Warning: mysql_query() expects parameter 2 to be resource, null given in 8.php on line 36
    I am getting this error any help.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,303
    Thanks
    23
    Thanked 612 Times in 611 Posts
    You really should post code when you have a problem with it.
    This is from the manual PHP: mysql_select_db - Manual
    PHP Code:
    <?php

    $link 
    mysql_connect('localhost''mysql_user''mysql_password');
    if (!
    $link) {
        die(
    'Not connected : ' mysql_error());
    }

    // make foo the current db
    $db_selected mysql_select_db('foo'$link);
    if (!
    $db_selected) {
        die (
    'Can\'t use foo : ' mysql_error());
    }
    ?>
    Does it help?
    P.S. should use mysqli
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • Users who have thanked sunfighter for this post:

    Pearl_9 (05-10-2014)

  • #3
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Thanksssss

  • #4
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Php code won't dispaly on next page

    PHP Code:



    But i have one more  problem on alooot.com/99/booking.php  everything is working perfect, but on alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php  
    is not working ,won't display results something missing i want let you know that alooot/8653.php and alooot.com/99/8.php i same files.(8653.php and 8.php are same)


    This is code for alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php  

    <?php require_once('../../../../Connections/webdes42_bookingsystem.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      if (
    PHP_VERSION 6) {
        
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch (
    $theType) {
        case 
    "text":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;    
        case 
    "long":
        case 
    "int":
          
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case 
    "double":
          
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case 
    "date":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;
        case 
    "defined":
          
    $theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
          break;
      }
      return 
    $theValue;
    }
    }

    $editFormAction $_SERVER['PHP_SELF'];
    if (isset(
    $_SERVER['QUERY_STRING'])) {
      
    $editFormAction .= "?" htmlentities($_SERVER['QUERY_STRING']);
    }

    if ((isset(
    $_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      
    $insertSQL sprintf("INSERT INTO adult (rooms, adult, kids, startDate, endDate) VALUES (%s, %s, %s, %s, %s)",
                           
    GetSQLValueString($_POST['rooms'], "int"),
                           
    GetSQLValueString($_POST['adult'], "int"),
                           
    GetSQLValueString($_POST['kids'], "int"),
                           
    GetSQLValueString($_POST['startDate'], "text"),
                           
    GetSQLValueString($_POST['endDate'], "text"));

      
    mysql_select_db($database_webdes42_bookingsystem$webdes42_bookingsystem);
      
    $Result1 mysql_query($insertSQL$webdes42_bookingsystem) or die(mysql_error());

      
    $insertGoTo "../../../../8653.php";
      if (isset(
    $_SERVER['QUERY_STRING'])) {
        
    $insertGoTo .= (strpos($insertGoTo'?')) ? "&" "?";
        
    $insertGoTo .= $_SERVER['QUERY_STRING'];
      }
      
    header(sprintf("Location: %s"$insertGoTo));
    }
    ?>



    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>
    <p>&nbsp;</p>
    <script type="text/javascript">
    $(function() {
        $( "#startDate" ).datepicker({
            showOn:"both",
            dateFormat:"dd-mm-yy"
        }); 
    });
    $(function() {
        $( "#endDate" ).datepicker({
            showOn:"both",
            dateFormat:"dd-mm-yy"
        }); 
    });
    </script>     
       <div data-role="fieldcontain" class="calender cornerTrue">  
    <!DOCTYPE html>
    <!--[if IE 7 ]>    <html class="ie7 oldie" lang="en"> <![endif]-->
    <!--[if IE 8 ]>    <html class="ie8 oldie" lang="en"> <![endif]-->
    <!--[if IE      ]>    <html class="ie" lang="en"> <![endif]-->
    <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <html>
        <div data-role="fieldcontain" class="calender cornerTrue">

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="HandheldFriendly" content="True">
        <title>Book Your Travel - Car rental</title>
        <link rel="stylesheet" href="css/style.css" type="text/css" media="screen,projection,print" />
        <link rel="stylesheet" href="css/theme-turqoise.css" id="template-color" />
        <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />
        <link rel="shortcut icon" href="images/favicon.ico" />
        <script type="text/javascript" src="../../../ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script type="text/javascript" src="../../../ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
        <script type="text/javascript" src="js/css3-mediaqueries.js"></script>
        <script type="text/javascript" src="js/sequence.jquery-min.js"></script>
        <script type="text/javascript" src="js/jquery.uniform.min.js"></script>
        <script type="text/javascript" src="js/jquery.prettyPhoto.js"></script>
        <script type="text/javascript" src="js/sequence.js"></script>
        <script type="text/javascript" src="js/selectnav.js"></script>
        <script type="text/javascript" src="js/scripts.js"></script>
        <script type="text/javascript">        
                /* Template Styles-----------------------------------------------------------------------------------*/

            window.console = window.console || (function(){
                var c = {}; c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function(){};
                return c;
            })();


            jQuery(document).ready(function($) {
        
            // Color Changer
            $(".yellow" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-yellow.css" );
                return false;
            });
            
            $(".orange" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-orange.css" );
                return false;
            });
            
            $(".strawberry" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-strawberry.css" );
                return false;
            });
            
            $(".pink" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-pink.css" );
                return false;
            });        
            
            $(".purple" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-purple.css" );
                return false;
            });

            $(".blue" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-blue.css" );
                return false;
            });        
            
            $(".black" ).click(function(){
                $("#template-color" ).attr("href", "css/theme-black.css" );
                return false;
            });        
            
            


            $("#template-styles h2 a").click(function(e){
                e.preventDefault();
                var div = $("#template-styles");
                console.log(div.css("left"));
                if (div.css("left") === "-135px") {
                    $("#template-styles").animate({
                        left: "0px"
                    }); 
                } else {
                    $("#template-styles").animate({
                        left: "-135px"
                    });
                }
            })
            

            $(".colors li a").click(function(e){
                e.preventDefault();
                $(this).parent().parent().find("a").removeClass("active");
                $(this).addClass("active");
            })
            
            $(".bg li a").click(function(e){
                e.preventDefault();
                $(this).parent().parent().find("a").removeClass("active");
                $(this).addClass("active");
                var bg = $(this).css("backgroundImage");
                $("body,.main").css("backgroundImage",bg)
            })

                

        });

        </script>
        <link rel="stylesheet" href="css/styler.css" type="text/css" media="screen,projection,print" />
    </head>
    <body>
    <!-- TEMPLATE STYLES -->
    <div id="template-styles">
        <h2>Template Styles <a href="#"><img class="s-s-icon" src="images/settings.png" alt="Style switcher" /></a></h2>
        <div>
        <h3>Colors</h3>
            <ul class="colors" >
                <li><a href="#" class="yellow" title="yellow"></a></li>
                <li><a href="#" class="orange" title="orange"></a></li>
                <li><a href="#" class="strawberry" title="strawberry"></a></li>
                <li><a href="#" class="pink" title="pink"></a></li>
                <li><a href="#" class="purple" title="purple"></a></li>
                <li><a href="#" class="blue" title="blue"></a></li>
                <li><a href="#" class="black" title="black"></a></li>
            </ul>
            
        <h3>Background Image</h3>
             <ul class="colors bg" id="bg">
                <li><a href="#" class="bg1"></a></li>
                <li><a href="#" class="bg2"></a></li>
                <li><a href="#" class="bg3"></a></li>
                <li><a href="#" class="bg4"></a></li>
                <li><a href="#" class="bg5"></a></li>
                <li><a href="#" class="bg6"></a></li>
                <li><a href="#" class="bg7"></a></li>
                <li><a href="#" class="bg8"></a></li>
                <li><a href="#" class="bg9"></a></li>
                <li><a href="#" class="bg10"></a></li>
                <li><a href="#" class="bg11"></a></li>
                <li><a href="#" class="bg12"></a></li>
                <li><a href="#" class="bg13"></a></li>
                <li><a href="#" class="bg14"></a></li>
                <li><a href="#" class="bg15"></a></li>
                <li><a href="#" class="bg16"></a></li>
                <li><a href="#" class="bg17"></a></li>
                <li><a href="#" class="bg18"></a></li>
                <li><a href="#" class="bg19"></a></li>
                <li><a href="#" class="bg20"></a></li>
                <li><a href="#" class="bg21"></a></li>
                <li><a href="#" class="bg22"></a></li>
                <li><a href="#" class="bg23"></a></li>
                <li><a href="#" class="bg24"></a></li>
                <li><a href="#" class="bg25"></a></li>
                <li><a href="#" class="bg26"></a></li>
                <li><a href="#" class="bg27"></a></li>
                <li><a href="#" class="bg28"></a></li>
                <li><a href="#" class="bg29"></a></li>
                <li><a href="#" class="bg30"></a></li>
            </ul>
        </div>
    </div>    
        <!--header-->
        <header>
            <div class="wrap clearfix">
                <!--logo-->
                <h1 class="logo"><a href="index.html" title="Book Your Travel - home"><img src="images/txt/logo.png" alt="Book Your Travel" /></a></h1>
                <!--//logo-->
                
                <!--ribbon-->
                <div class="ribbon">
                    <nav>
                        <ul class="profile-nav">
                            <li class="active"><a href="#" title="My Account">My Account</a></li>
                            <li><a href="login.html" title="Login">Login</a></li>
                            <li><a href="my_account.html" title="Settings">Settings</a></li>
                        </ul>
                        <ul class="lang-nav">
                            <li class="active"><a href="#" title="English (US)">English (US)</a></li>
                            <li><a href="#" title="English (UK)">English (UK)</a></li>
                            <li><a href="#" title="Deutsch">Deutsch</a></li>
                            <li><a href="#" title="Italiano">Italiano</a></li>
                            <li><a href="#" title="Русский">Русский</a></li>
                        </ul>
                        <ul class="currency-nav">
                            <li class="active"><a href="#" title="$US Dollar">$US Dollar</a></li>
                            <li><a href="#" title="€ Euro">€ Euro</a></li>
                            <li><a href="#" title="£ Pound">£ Pound</a></li>
                        </ul>
                    </nav>
                </div>
                <!--//ribbon-->
                
                <!--search-->
                <div class="search">
                    <form id="search-form" method="get" action="">
                        <input type="search" placeholder="Search entire site here" name="site_search" id="site_search" /> 
                        <input type="submit" id="submit-site-search" value="submit-site-search" name="submit-site-search"/>
                    </form>
                </div>
                <!--//search-->
                
                <!--contact-->
                <div class="contact">
                    <span>24/7 Support number</span>
                    <span class="number">1- 555 - 555 - 555</span>
                </div>
                <!--//contact-->
            </div>
            
            <!--main navigation-->
            <nav class="main-nav" role="navigation" id="nav">
                <ul class="wrap">
                    <li><a href="hotels.html" title="Hotels">Hotels</a>
                        <ul>
                            <li><a href="#">Secondary navigation</a></li>
                            <li><a href="#">example links</a></li>
                            <li><a href="error.html">Error page</a></li>
                            <li><a href="loading.html">Loading page</a></li>
                        </ul>
                    </li>
                    <li class="active"><a href="flights.html" title="Flights">Flights</a></li>
                    <li><a href="flight_and_hotels.html" title="Flight + Hotel">Flight + Hotel</a></li>
                    <li><a href="self_catering.html" title="Self catering">Self catering</a></li>
                    <li><a href="cruise.html" title="Cruises">Cruises</a></li>
                    <li><a href="car_rental.html" title="Car rental">Car rental</a></li>
                    <li><a href="hot_deals.html" title="Hot deals">Hot deals</a></li>
                    <li><a href="#" title="Vacations">Vacations</a></li>
                    <li><a href="#" title="Business travel">Business travel</a></li>
                    <li><a href="#" title="Group travel">Group travel</a></li>
                    <li><a href="get_inspired.html" title="Get inspired">Get inspired</a></li>
                    <li><a href="#" title="Travel guides">Travel guides</a>
                        <ul>
                            <li><a href="location.html">Location Details</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
            <!--//main navigation-->
        </header>
        <!--//header-->
        
        <!--slider-->
        <section class="slider clearfix">
            <div id="sequence">
                <ul>
                    <li>
                        <div class="info animate-in">
                            <h2>Last minute Winter escapes</h2><br />
                            <p>January 2013 holidays 40% off! An unique opportunity to realize your dreams</p>
                        </div>
                        <img class="main-image animate-in" src="images/slider/img3.jpg" alt="" />
                    </li>
                    <li>
                        
                        <img class="main-image animate-in" src="images/slider/img1.jpg" alt="" />
                    </li>
                  <li>
                    <div class="info animate-in">
                            <h2>Check out last minute flight, hotel &amp; vacation offers!</h2><br />
                            <p>Save up to 50%!</p>
                        </div>
                        <img class="main-image animate-in" src="images/slider/img5.jpg" alt="" />
                    </li>
                    <li>
                        
                        <img class="main-image animate-in" src="images/slider/img1.jpg" alt="" />
                  </li>
                    <li>    
                        <a href="images/slider/amsterdam.jpg"><img class="main-image animate-in" src="images/slider/img3.jpg" alt="" />
                    </a></li>
                    <li>
                        
                        <img class="main-image animate-in" src="images/slider/img1.jpg" alt="" />
                    </li>
                    <li>
                        <div class="info animate-in">
                            <h2>Check out last minute flight, hotel &amp; vacation offers!</h2><br />
                            <p>Save up to 50%!</p>
                        </div>
                        <img class="main-image animate-in" src="images/slider/img2.jpg" alt="" />
                    </li>
                </ul>
            </div>
        </section>
        <!--//slider-->
        
        <!--search-->
        
            
        </div>
        <!--//search-->
        
        <!--main-->
        
                <!--deals-->
    <section class="full">
                    <h1>&nbsp;
                      <form method="post" name="form1" action="<?php echo $editFormAction?>">
                        <div align="center">
                          <table width="481" height="438" align="center">
                            <tr valign="baseline">
                              <td nowrap align="right">Rooms:</td>
                              <td><input type="text" name="rooms" value="<?php echo $_POST['Rooms']; ?>" size="22"></td>
                            </tr>
                            <tr valign="baseline">
                              <td nowrap align="right">Adult:</td>
                              <td><input name="adult" type="text" value="<?php echo $_POST['adult']; ?>" size="32"></td>
                            </tr>
                            <tr valign="baseline">
                              <td nowrap align="right">Kids:</td>
                              <td><input type="text" name="kids" value="<?php echo $_POST['kids']; ?>" size="32"></td>
                            </tr>
                            <tr valign="baseline">
                          <td nowrap align="right">StartDate:</td>
                                   <td><input type="text" id="startDate" name="startDate" value="<?php echo $_POST['startDate']; ?>" size="32"></td>
                             </tr>
                            <tr valign="baseline">
                             <td nowrap align="right">EndDate:</td>
                           <td><input type="text" id="endDate" name="endDate" value="<?php echo $_POST['endDate']; ?>" size="32"></td>
                             </tr>
                            <tr valign="baseline">
                              <td nowrap align="right">&nbsp;</td>
                              <td align="center" valign="baseline"><input name="Submit" type="submit" id="Submit" value="submit"></td>
                            </tr>
                          </table>
                          <input type="hidden" name="MM_insert" value="form1">
                        </div>
                      </form>
                      <p>&nbsp;</p>
                    </h1>
                </section>    
                <!--//deals-->
                
                <!--top destinations-->
                <section class="destinations clearfix last">
                    <h1>&nbsp;</h1>
                    
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                    
                    <!--column--><!--//column-->
                </section>
                <!--//top destinations-->
            </div>
        </div>
        <!--//main-->
        
        <!--footer-->
        <footer>
        
    <div class="wrap clearfix">
                <!--column-->
                <article class="one-fourth">
                    <h3>Book Your Travel
                </article>
                <!--//column-->
                
                <!--column-->
                <article class="one-fourth">
                    <h3>Customer support</h3>
                    <ul>
                        <li><a href="#" title="Faq">Faq</a></li>
                        <li><a href="#" title="How do I make a reservation?">How do I make a reservation?</a></li>
                        <li><a href="#" title="Payment options">Payment options</a></li>
                        <li><a href="#" title="Booking tips">Booking tips</a></li>
                    </ul>
                </article>
                <!--//column-->
                
                <!--column-->
                <article class="one-fourth">
                    <h3>Follow us</h3>
                    <ul class="social">
                        <li class="facebook"><a href="#" title="facebook">facebook</a></li>
                        <li class="youtube"><a href="#" title="youtube">youtube</a></li>
                        <li class="rss"><a href="#" title="rss">rss</a></li>
                        <li class="linkedin"><a href="#" title="linkedin">linkedin</a></li>
                        <li class="googleplus"><a href="#" title="googleplus">googleplus</a></li>
                        <li class="twitter"><a href="#" title="twitter">twitter</a></li>
                        <li class="vimeo"><a href="#" title="vimeo">vimeo</a></li>
                        <li class="pinterest"><a href="#" title="pinterest">pinterest</a></li>
                    </ul>
                </article>
                <!--//column-->
                
                <!--column-->
                <article class="one-fourth last">
                    <h3>Don’t miss our exclusive offers</h3>
                    <form id="newsletter" action="http://www.kajag.com/themes/book_your_travel/newsletter.php" method="post">
                        <fieldset>
                            <input type="email" id="newsletter_signup" name="newsletter_signup" placeholder="Enter your email here" />
                            <input type="submit" id="newsletter_submit" name="newsletter_submit" value="Signup" class="gradient-button" />
                        </fieldset>
                    </form>
                </article>
                <!--//column-->
                
                <section class="bottom">
                    <p class="copy">Copyright 2012 Book your travel ltd. All rights reserved</p>
                    <nav>
                        <ul>
                            <li><a href="#" title="About us">About us</a></li>
                            <li><a href="contact.html" title="Contact">Contact</a></li>
                            <li><a href="#" title="Partners">Partners</a></li>
                            <li><a href="#" title="Customer service">Customer service</a></li>
                            <li><a href="#" title="FAQ">FAQ</a></li>
                            <li><a href="#" title="Careers">Careers</a></li>
                            <li><a href="#" title="Terms & Conditions">Terms &amp; Conditions</a></li>
                            <li><a href="#" title="Privacy statement">Privacy statement</a></li>
                        </ul>
                    </nav>
                </section>
            </div>
        </footer>
        <!--//footer-->
        <script>
            // Initiate selectnav function
            selectnav();
        </script>
        
        <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-37606232-1']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
    </body>


    </html>

    <?php
    mysql_free_result
    ($Recordset1);
    ?>

  • #5
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    This is code for alooot.com/99/booking.php




    <!DOCTYPE html>
    <html>


    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Booking</title>
    <link rel="stylesheet" href="styles/jquery.mobile.structure-1.1.0.min.css" />
    <script src="scripts/jquery-1.7.1.min.js"></script>
    <script src="scripts/jquery.mobile-1.1.0.min.js"></script>
    <script type="text/javascript" src="scripts/datebox/jquery.mobile.datebox.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    function getdays() {
    var rightnow = new Date()
    today = new Date(rightnow.getFullYear(), rightnow.getMonth(), rightnow.getDate(), 0,0,0,0)
    maxdate = new Date(2012, 5, 30, 0,0,0,0)
    daysuntil = ( maxdate - today ) / ( 1000 * 60 * 60 * 24 )
    daysuntil = daysuntil + 1
    // Without this, Jun 30 isn't valid.
    return parseInt(daysuntil,10)
    }
    $('#checkin').live('dateboxcreate', function() {
    $('#checkin').data('datebox').options.maxDays = getdays()
    });
    });
    </script>
    <link rel="stylesheet" href="themes/theme.css" />
    <link rel="stylesheet" type="text/css" href="scripts/datebox/jquery.mobile.datebox.min.css" />
    <link rel="stylesheet" href="styles/style.css" />
    </head>
    <body bgcolor="#000000">




    <div data-role="page">
    <div class="hdr">
    <div class="logo"><img src="images/inclussion-icons/botanico_hotel_logos_sz2.png" width="286" height="121"></div>
    <a href="index.php" data-role="button" data-iconpos="left" data-theme="b" data-content-theme="b" class="res">Book Now</a>
    <a href="index.php" data-role="button" data-icon="back" data-iconpos="left" data-theme="b" data-content-theme="b" class="back">&nbsp;</a>
    </div>
    <div class="hdrImg"><img src="Hotel-adakule-hotel-kusadasi-adakule-hotel-tatil-adakule-hotel.jpg" width="100%" height="100%"class="fluied"</div>
    <!-- /header -->
    <div data-role="content">

    <div data-role="collapsible" data-collapsed="false" class="cornerNone">
    <h3>Online Booking</h3>
    <div class="form srcHome">
    <form id="hotelSearchForm" name="hotelSearchForm" method="post" action="8.php">
    <div data-role="fieldcontain" class="calender cornerTrue"> <?php require_once('Connections/suadprava.php'); ?>



    <?php

    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }


    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    $x2 = $_POST['endDate'];
    $x1 = $_POST['startDate'];
    $p1=strtotime("$x1");
    $p2=strtotime("$x2");
    $ps=strtotime("the day before now");

    printf("Last inserted record has id %d\n", mysql_insert_id());

    $brojDana=($p2-$p1)/86400;
    if( $brojDana<0 )
    {

    echo "Niste ispravno unjeli vrijeme dolaska i odlaska";


    exit();

    }
    if ($ps>$p1)
    {
    echo "Narucliste vrijeme u proslosti ";
    exit();

    }


    //$_POST['brojDana']=$brojDana;
    }

    $maxRooms = 10;

    if($numberRooms >= $maxRooms)

    $insertSQL = sprintf("INSERT INTO adult (kids, ) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));



    $maxRooms = 10;

    if($numberRooms < $maxRooms)
    $insertSQL = sprintf("INSERT INTO adult (kids, ) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));







    $maxRooms = 10;

    if($numberRooms < $maxRooms)




    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO adult (startDate, endDate, adult, kids, rooms) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));


    echo "Vi imate broj dijece " .$_POST['kids']. " .";



    echo "Vi imate broj odraslih " .$_POST['adult']. " .";



    echo "Vi želite rezervisati sobu u vremenu od " .$_POST['startDate']. " do " .$_POST['endDate']. " u trajanju od " .$brojDana. " dana ( ".$brojDana." noaenja).";
    if(
    $_POST['sobe']=1)
    {
    $s1=350;
    $cjena=$brojDana*$s1;
    echo $cjena;
    }

    $s1=450;

    $s1=550;
    exit();
    mysql_select_db($database_suadprava, $suadprava);
    $Result1 = mysql_query($insertSQL, $suadprava) or die(mysql_error());
    }


    $insertGoTo = "thanks.php";

    ?>

    <h3>If you wish reserve room insert dates here: <br />
    </h3>
    <p>Enter 1 for one bedroom in the field for rooms</p>
    <p>Enter 2 for two bed</p>
    <p>Enter 3 for apartmant<br />
    </p>
    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>


    <form method="get" name="form1" action="<?php echo $editFormAction; ?>">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">StartDate:</td>
    <td><input type="text" id="startDate" name="startDate" value="<?php echo $_POST['startDate']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">EndDate:</td>
    <td><input type="text" id="endDate" name="endDate" value="<?php echo $_POST['endDate']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Adult:</td>
    <td><input name="adult" type="text" id="adult" value="<?php echo $_POST['Brojodraslih']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Kids:</td>
    <td><input name="kids" type="text" id="kids" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Rooms:</td>
    <td><input name="rooms" type="text" id="rooms" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">&nbsp;</td>
    <td><input name="Submit" type="submit" id="Submit" value="Submit"></td>
    </tr>



    </table>
    <input type="hidden" name="MM_insert" value="form1">
    </form>
    <p>&nbsp;</p>
    <script type="text/javascript">
    $(function() {
    $( "#startDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    $(function() {
    $( "#endDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    </script> </div>
    <div data-role="fieldcontain" class="calender cornerTrue"><?php require_once('../Connections/Adult.php'); ?>





    </html>
    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    body,td,th {
    color: #828282;
    font-weight: 900;
    }
    body {
    background-color: #000;
    color: #999;
    }
    .boja {
    color: #999;
    }
    </style>
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>





    <div data-role="fieldcontain" class="calender cornerTrue"> </div>
    </form>
    <div data-role="page">
    <div class="hdr">
    <div class="logo"><img src="images/inclussion-icons/botanico_hotel_logos_sz2.png" width="286" height="121"></div>
    <a href="booking.php" data-role="button" data-iconpos="left" data-theme="b" data-content-theme="b" class="res">Home</a><a href="index.php" data-role="button" data-icon="back" data-iconpos="left" data-theme="b" data-content-theme="b" class="back"></a>
    </div>
    <div class="hdrImg"></div>
    <!-- /header -->
    <div data-role="content">

    <div data-role="collapsible" data-collapsed="false" class="cornerNone">
    <h3>&nbsp;</h3>
    <div class="form srcHome">
    <form id="hotelSearchForm" name="hotelSearchForm" method="post" action="Thanks.php">
    <div data-role="fieldcontain" class="calender cornerTrue"> <?php require_once('Connections/suadprava.php'); ?>
    <?php




    session_start();

    $_SESSION['regName'] = $regValue;

    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }

  • #6
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    this rest of the code of the
    alooot.com/99/booking.php
    i couldn't put on same page.





    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    $x2 = $_POST['endDate'];
    $x1 = $_POST['startDate'];
    $p1=strtotime("$x1");
    $p2=strtotime("$x2");
    $ps=strtotime("the day before now");



    $brojDana=($p2-$p1)/86400;
    if( $brojDana<0 )
    {

    echo "Niste ispravno unjeli vrijeme dolaska i odlaska";

    exit();

    }
    if ($ps>$p1)
    {
    echo "Narucliste vrijeme u proslosti ";
    exit();

    }


    //$_POST['brojDana']=$brojDana;




    mysql_select_db($database_suadprava, $suadprava);
    $Result1 = mysql_query($insertSQL, $suadprava) or die(mysql_error());
    }
    ?>
    <?php
    include("../dobar websajt/_include/namVremena.php");
    date_default_timezone_set('Europe/Sarajevo');
    $date = new DateTime();

    echo "Danas je: " .$date->format('d-m-Y: G:i');

    echo "<br>";

    ?>
    <h3>Ako želite rezervisati mjesto u hotelu u periodu: <br />
    <?php echo $row_Recordset1['endDate']; ?></h3>
    <p>Defini&scaron;ite datum dolaska i datum odlaska....</p>

    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>



    </div>
    </div><!-- end of the Facilites -->
    </div>
    <p>&nbsp;</p>











    </form>
    <p>&nbsp;</p>
    <script type="text/javascript">
    $(function() {
    $( "#startDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    $(function() {
    $( "#endDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    </script>
    </form>



    </body>


    </html><?php
    mysql_free_result($Recordset1);
    ?>
    </div>
    </form>
    </div>
    </div><!-- end of the Facilites -->
    </div>
    <div class="ftr">Exo<br />
    View standard website: <a href="#">Exo</a><br />
    Designed by <a href="#">Jonny</a> | <a href="#">Exo Support</a></div>
    </div>
    </body>


    </html>





    <!DOCTYPE html>
    <html>


    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Booking</title>
    <link rel="stylesheet" href="styles/jquery.mobile.structure-1.1.0.min.css" />
    <script src="scripts/jquery-1.7.1.min.js"></script>
    <script src="scripts/jquery.mobile-1.1.0.min.js"></script>
    <script type="text/javascript" src="scripts/datebox/jquery.mobile.datebox.min.js"></script>
    <script type="text/javascript">
    $(document).rea
    dy(function() {
    function getdays() {
    var rightnow = new Date()
    today = new Date(rightnow.getFullYear(), rightnow.getMonth(), rightnow.getDate(), 0,0,0,0)
    maxdate = new Date(2012, 5, 30, 0,0,0,0)
    daysuntil = ( maxdate - today ) / ( 1000 * 60 * 60 * 24 )
    daysuntil = daysuntil + 1
    // Without this, Jun 30 isn't valid.
    return parseInt(daysuntil,10)
    }
    $('#checkin').live('dateboxcreate', function() {
    $('#checkin').data('datebox').options.maxDays = getdays()
    });
    });
    </script>
    <link rel="stylesheet" href="themes/theme.css" />
    <link rel="stylesheet" type="text/css" href="scripts/datebox/jquery.mobile.datebox.min.css" />
    <link rel="stylesheet" href="styles/style.css" />
    </head>
    <body bgcolor="#000000">




    <div data-role="page">
    <div class="hdr">
    <div class="logo"><img src="images/inclussion-icons/botanico_hotel_logos_sz2.png" width="286" height="121"></div>
    <a href="index.php" data-role="button" data-iconpos="left" data-theme="b" data-content-theme="b" class="res">Book Now</a>
    <a href="index.php" data-role="button" data-icon="back" data-iconpos="left" data-theme="b" data-content-theme="b" class="back">&nbsp;</a>
    </div>
    <div class="hdrImg"><img src="Hotel-adakule-hotel-kusadasi-adakule-hotel-tatil-adakule-hotel.jpg" width="100%" height="100%"class="fluied"</div>
    <!-- /header -->
    <div data-role="content">

    <div data-role="collapsible" data-collapsed="false" class="cornerNone">
    <h3>Online Booking</h3>
    <div class="form srcHome">
    <form id="hotelSearchForm" name="hotelSearchForm" method="post" action="8.php">
    <div data-role="fieldcontain" class="calender cornerTrue"> <?php require_once('Connections/suadprava.php'); ?>



    <?php

    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }


    }


    //$_POST['brojDana']=$brojDana;
    }

    $maxRooms = 10;

    if($numberRooms >= $maxRooms)

    $insertSQL = sprintf("INSERT INTO adult (kids, ) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));













    $maxRooms = 10;

    if($numberRooms < $maxRooms)
    $insertSQL = sprintf("INSERT INTO adult (kids, ) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));







    $maxRooms = 10;

    if($numberRooms < $maxRooms)




    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO adult (startDate, endDate, adult, kids, rooms) VALUES (%s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['startDate'], "text"),
    GetSQLValueString($_POST['endDate'], "text"),
    GetSQLValueString($_POST['adult'], "int"),
    GetSQLValueString($_POST['kids'], "int"),
    GetSQLValueString($_POST['rooms'], "int"));


    );
    mysql_select_db($database_suadprava, $suadprava);
    $Result1 = mysql_query($insertSQL, $suadprava) or die(mysql_error());
    }


    $insertGoTo = "thanks.php";

    ?>

    <h3>If you wish reserve room insert dates here: <br />
    </h3>
    <p>Enter 1 for one bedroom in the field for rooms</p>
    <p>Enter 2 for two bed</p>
    <p>Enter 3 for apartmant<br />
    </p>
    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>


    <form method="get" name="form1" action="<?php echo $editFormAction; ?>">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">StartDate:</td>
    <td><input type="text" id="startDate" name="startDate" value="<?php echo $_POST['startDate']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">EndDate:</td>
    <td><input type="text" id="endDate" name="endDate" value="<?php echo $_POST['endDate']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Adult:</td>
    <td><input name="adult" type="text" id="adult" value="<?php echo $_POST['Brojodraslih']; ?>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Kids:</td>
    <td><input name="kids" type="text" id="kids" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Rooms:</td>
    <td><input name="rooms" type="text" id="rooms" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">&nbsp;</td>
    <td><input name="Submit" type="submit" id="Submit" value="Submit"></td>
    </tr>



    </table>
    <input type="hidden" name="MM_insert" value="form1">
    </form>
    <p>&nbsp;</p>
    <script type="text/javascript">
    $(function() {
    $( "#startDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    $(function() {
    $( "#endDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    </script> </div>
    <div data-role="fieldcontain" class="calender cornerTrue"><?php require_once('../Connections/Adult.php'); ?>





    </html>
    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    body,td,th {
    color: #828282;
    font-weight: 900;
    }
    body {
    background-color: #000;
    color: #999;
    }
    .boja {
    color: #999;
    }
    </style>
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>





    <div data-role="fieldcontain" class="calender cornerTrue"> </div>
    </form>
    <div data-role="page">
    <div class="hdr">
    <div class="logo"><img src="images/inclussion-icons/botanico_hotel_logos_sz2.png" width="286" height="121"></div>
    <a href="booking.php" data-role="button" data-iconpos="left" data-theme="b" data-content-theme="b" class="res">Home</a><a href="index.php" data-role="button" data-icon="back" data-iconpos="left" data-theme="b" data-content-theme="b" class="back"></a>
    </div>
    <div class="hdrImg"></div>
    <!-- /header -->
    <div data-role="content">

    <div data-role="collapsible" data-collapsed="false" class="cornerNone">
    <h3>&nbsp;</h3>
    <div class="form srcHome">
    <form id="hotelSearchForm" name="hotelSearchForm" method="post" action="Thanks.php">
    <div data-role="fieldcontain" class="calender cornerTrue"> <?php require_once('Connections/suadprava.php'); ?>
    <?php




    session_start();

    $_SESSION['regName'] = $regValue;
















    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }


    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
    $x2 = $_POST['endDate'];
    $x1 = $_POST['startDate'];
    $p1=strtotime("$x1");
    $p2=strtotime("$x2");
    $ps=strtotime("the day before now");



    $brojDana=($p2-$p1)/86400;
    if( $brojDana<0 )
    {

    echo "Niste ispravno unjeli vrijeme dolaska i odlaska";

    exit();

    }
    if ($ps>$p1)
    {
    echo "Narucliste vrijeme u proslosti ";
    exit();

    }



    mysql_select_db($database_suadprava, $suadprava);
    $Result1 = mysql_query($insertSQL, $suadprava) or die(mysql_error());
    }
    ?>
    <?php
    include("../dobar websajt/_include/namVremena.php");
    date_default_timezone_set('Europe/Sarajevo');
    $date = new DateTime();

    echo "Danas je: " .$date->format('d-m-Y: G:i');

    echo "<br>";

    ?>
    <h3>Ako želite rezervisati mjesto u hotelu u periodu: <br />
    <?php echo $row_Recordset1['endDate']; ?></h3>
    <p>Defini&scaron;ite datum dolaska i datum odlaska....</p>

    <link href="/jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="/jQueryAssets/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css">
    <script src="/jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/jQueryAssets/jquery-ui-1.9.2.datepicker.custom.min.js" type="text/javascript"></script>



    </div>
    </div><!-- end of the Facilites -->
    </div>
    <p>&nbsp;</p>











    </form>
    <p>&nbsp;</p>
    <script type="text/javascript">
    $(function() {
    $( "#startDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    $(function() {
    $( "#endDate" ).datepicker({
    showOn:"both",
    dateFormat:"dd-mm-yy"
    });
    });
    </script>
    </form>



    </body>


    </html><?php
    mysql_free_result($Recordset1);
    ?>
    </div>
    </form>
    </div>
    </div><!-- end of the Facilites -->
    </div>
    <div class="ftr">Exo<br />
    View standard website: <a href="#">Exo</a><br />
    Designed by <a href="#">Jonny</a> | <a href="#">Exo Support</a></div>
    </div>
    </body>


    </html>


    alooot.com/99/booking.php half code is not necessary i was playing with that and didn't want to delete.

  • #7
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Any helpppp,anybody checking this let me know.

  • #8
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,303
    Thanks
    23
    Thanked 612 Times in 611 Posts
    After 143 post you should be very aware that you need to enclose your code inside of code or php tags, to make it easier on the viewers, or else you may not get any help.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #9
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    After 143 post you should be very aware that you need to enclose your code inside of code or php tags, to make it easier on the viewers, or else you may not get any help.
    I sorry for that i forgot.i hope you will take my apologize.

  • #10
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,877
    Thanks
    2
    Thanked 164 Times in 159 Posts
    You should also ask a specific question about the problem you need to solve and only post the relative code. Dumping your entire script and expecting us to troubleshoot it is not going to be very fruitful.

  • #11
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by FishMonger View Post
    You should also ask a specific question about the problem you need to solve and only post the relative code. Dumping your entire script and expecting us to troubleshoot it is not going to be very fruitful.




    alooot.com/99/booking.php is working perfect booking system , but on alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php ,is not working

    try to book room on alooot.com/99/booking.php and try on alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php that is question why on alooot.com/99/booking.php i can see results but on alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php is not working i can't see results(i can't dispaly code).

  • #12
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,303
    Thanks
    23
    Thanked 612 Times in 611 Posts
    @Pearl_9
    Why not close this thread out and start a new one with a problem clearly stated and the code that's causing it. OK? It would be simpler for us, I think.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #13
    Regular Coder
    Join Date
    Aug 2013
    Posts
    196
    Thanks
    14
    Thanked 0 Times in 0 Posts

    page won't display results

    Quote Originally Posted by sunfighter View Post
    @Pearl_9
    Why not close this thread out and start a new one with a problem clearly stated and the code that's causing it. OK? It would be simpler for us, I think.
    I don't want close because i have you here and fish to check this code.The code is big so i will need two pages to set up.The problem is i can't see results on alooot.com/8653.php like i do on alooot.com/99/8.php something missing so when i enter informations on alooot.com/653/www.kajag.com/themes/book_your_travel/car_rental.php and goes on alooot.com/8653.php startDate, endDate,rooms,adult,kids and price is missing.

  • #14
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,877
    Thanks
    2
    Thanked 164 Times in 159 Posts
    I don't want close because i have you here and fish to check this code.
    I'm not going to reverse engineer that code.

    If you want my help, you'll need to post a specific distinct question that focuses on the section of code that is giving you trouble and post that relevant code. AND that needs to be in a new thread rather than tagging in onto this one.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •