Jump to content

cant refer to datepicker class


zgkhoo

Recommended Posts

hi,


    <head>
        <title>datepicker test</title>
    </head>
<body>
<?php

    // include the class
    require "../class.datepicker.php";

    // instantiate the object
    $dp=new datepicker();

?>

<p>
    Shortest way to start using the date picker...
</p>
<pre style="font-size:11px;">
// include the class
require "../class.datepicker.php";

// instantiate the object
$dp=new datepicker();

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">
</pre>

<p>Click on the button to see it work</p>

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">

</body>


<?php
include 'config.php';
include 'opendb.php';

if(isset($_POST['set'])){

$sql="INSERT INTO Result (DrawNumber,DrawDate,Category)
	VALUES ('$_POST[DrawNumber]','$_POST[DrawDate]','$_POST[Category]')";

mysql_query($sql, $con);
}
?>


<html>
<body>
<form action="setdraw.php"" method="POST" >
<table border="1"> 
<tr>
<td><h4>DrawNo</h4></td><td><h4>Set Draw Date(yyyy-mm-dd)</h4></td><td><h4>Set Category</h4></td>
</tr>
<tr>
<td>

<input type="text" name="DrawNumber">
</td>
<td>
<input type="text" name="DrawDate">
</td>
<td>
<select name="Category">
<option value="Magnum"> Magnum</option>
<option value="PMP"> PMP</option>
<option value="Toto"> Toto</option>
<option value="SgPools"> SgPools</option>
</select>
</td>
<td>   
<input type="submit" name="add" value="Add">
</td>

</tr>
<tr>  
<td>
<input type="submit" name="set" Value="Set">
</td>

</tr>


</table>

</form>
</body>

</html>


 

this file name setdraw.php , and i already put the class.datepicker.php <--into the same folder with setdraw.php.

but when it occur error  msg..

 

Warning: require(/class.datepicker.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\Sportstoto\sportstoto\setdraw.php on line 8

 

Fatal error: require() [function.require]: Failed opening required '/class.datepicker.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\Sportstoto\sportstoto\setdraw.php on line 8

 

anyone know how to solve? thanks..

Link to comment
Share on other sites



<!--begin of date picker -->
<head>
        <title>datepicker test</title>
    </head>
<body>
<?php

    // include the class
    require "class.datepicker.php";

    // instantiate the object
    $dp=new datepicker();

?>

<p>
    Shortest way to start using the date picker...
</p>
<pre style="font-size:11px;">
// include the class
require "class.datepicker.php";

// instantiate the object
$dp=new datepicker();

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">
</pre>

<p>Click on the button to see it work</p>

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">

</body>

<!--end  of date picker -->


<?php
include 'config.php';
include 'opendb.php';

if(isset($_POST['set'])){

$sql="INSERT INTO Result (DrawNumber,DrawDate,Category)
	VALUES ('$_POST[DrawNumber]','$_POST[DrawDate]','$_POST[Category]')";

mysql_query($sql, $con);
}
?>


<html>
<body>
<form action="setdraw.php"" method="POST" >
<table border="1"> 
<tr>
<td><h4>DrawNo</h4></td><td><h4>Set Draw Date(yyyy-mm-dd)</h4></td><td><h4>Set Category</h4></td>
</tr>
<tr>
<td>

<input type="text" name="DrawNumber">
</td>
<td>
<input type="text" name="DrawDate">
</td>
<td>
<select name="Category">
<option value="Magnum"> Magnum</option>
<option value="PMP"> PMP</option>
<option value="Toto"> Toto</option>
<option value="SgPools"> SgPools</option>
</select>
</td>
<td>   
<input type="submit" name="add" value="Add">
</td>

</tr>
<tr>  
<td>
<input type="submit" name="set" Value="Set">
</td>

</tr>


</table>

</form>
</body>

</html>

 

latest code, it work!, but when i click the button, it show object not found , why?

Link to comment
Share on other sites

<pre style="font-size:11px;">
// include the class
require "class.datepicker.php";

// instantiate the object
$dp=new datepicker();

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">
</pre>

 

for the above code, is javascript, php,html, or?

 

Link to comment
Share on other sites

// instantiate the object
$dp=new datepicker();

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">
</pre>

<p>Click on the button to see it work</p>

<input type="text" id="date">

<input type="button" value="..." onclick="<?=$dp->show("date")?>">

</body>

 

how to input the datepicker date to

 

here

 


wat code it was? confused...js?
<td>
<input type="text" name="DrawDate">
</td>

Link to comment
Share on other sites

then now to point to the neighbour's folder(another folder that same inside parent folder)

eg parent folder= project

now i at sub folder called "math"

how to point to another sub folder called "calculation"?

../calculation/

or

./calculation?

 

 

 

Link to comment
Share on other sites

one dot

"./calculation/" means point to a folder named calculation INSIDE your CURRENT directory.

"../calculation/" means point to a folder UP ONE adn then go DOWN to calculation.

 

think of all files structures as  an upside down tree.. the root being at the very top and it splits into branches and then leaves...

ROOT = "parent directory"

BRANCHES = "folders"

LEAVES = "files"

 

to get from one leaf to another i must travel on the same branch. to go from one branch to another i must travel along the root.

 

make sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.