**

I want a Help to Intergrate Google Calendar API to create Events thure webisite

**

Ihave tied some google documantation and some tutorials buth they acctually not working properly google documantions are not not working for me

i need to add new tag to head section on a HTML page using PHP

actualy i need to add

<link rel="canonical" href="<?php echo 'http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>"/>

Hope this can do using PHP DOM

need to alight div inside another div
inner div must be aligned centerd bottom of the outer div
i have attached a image that i want

Here is the Files im using

no i didn't got any errors

[QUOTE=sunwebsite;1425439]I thing the problem with you is connecting with data base.
make sure mysql connection with data base is correct.

and use
[CODE]mysql_select_db('helikro')[/CODE]
and use
[CODE]INSERT INTO itinerary ()[/CODE]

instead of
[CODE]INSERT INTO helikro.itinerary ()[/CODE][/QUOTE]

Not working friend

i think their is problem with line 8
if i use

[CODE]echo $deatils =$_POST["itadetails"]; [/CODE]

instead of

[CODE]echo $deatils ="Text here "; [/CODE]

then the codes are working fine

[B][B]
This codes are not working here and i cant find out why is that can you help me on this

(here i gave the database also problem is not in DB) [/B][/B]

[CODE]
CREATE TABLE itinerary (
id int(11) NOT NULL AUTO_INCREMENT,
type varchar(1000) NOT NULL,
name varchar(1000) NOT NULL,
days varchar(10) NOT NULL,
introduction longtext NOT NULL,
holiday_highlights mediumtext NOT NULL,
deatils longtext NOT NULL,
pic1 varchar(1000) NOT NULL,
pic2 varchar(1000) NOT NULL,
pic3 varchar(1000) NOT NULL,
pic4 varchar(1000) NOT NULL,
pic5 varchar(1000) NOT NULL,
pic6 varchar(1000) NOT NULL,
map varchar(1000) NOT NULL,
pre_accom varchar(1000) NOT NULL,
PRIMARY KEY (id)
)

[/CODE]

[CODE]
<?php
include ("../../init/db.php");
$type =$_POST['type'];
$name =$_POST['name'];
$days = $_POST['days'];
$introduction = $_POST['introduction'];
$holiday_highlights = $_POST['holidayh'];
echo $deatils1 =$_POST["itadetails"];
echo strlen($deatils);
$pre_accom = $_POST['pre_accom'];

mkdir('../../itinerary/'.$name, 0777);

$destination_path = '../../itinerary/'.$name.'/';

    $lmap= $name.basename( $_FILES['map']['name']);
    $img1= $name.basename( $_FILES['img1']['name']);
    $img2= $name.basename( $_FILES['img2']['name']);
    $img3= $name.basename( $_FILES['img3']['name']);
    $img4= $name.basename( $_FILES['img4']['name']);
    $img5= $name.basename( $_FILES['img5']['name']);
    $img6= $name.basename( $_FILES['img6']['name']);

    $target_path_lmap = $destination_path . $lmap;      
    $target_path_img1 = $destination_path .$img1;
    $target_path_img2 = $destination_path .$img2;
    $target_path_img3 = $destination_path .$img3;
    $target_path_img4 = $destination_path .$img4;
    $target_path_img5 = $destination_path .$img5;
    $target_path_img6 = $destination_path .$img6;

if(@move_uploaded_file($_FILES['banner']['tmp_name'], $target_path_banner)
&&
@move_uploaded_file($_FILES['lmap']['tmp_name'], $target_path_lmap)&&
@move_uploaded_file($_FILES['img1']['tmp_name'], $target_path_img1)&&
@move_uploaded_file($_FILES['img2']['tmp_name'], $target_path_img2)&&
@move_uploaded_file($_FILES['img3']['tmp_name'], $target_path_img3)&&
@move_uploaded_file($_FILES['img4']['tmp_name'],$target_path_img4)&&
@move_uploaded_file($_FILES['img5']['tmp_name'], $target_path_img5)&&
@move_uploaded_file($_FILES['img6']['tmp_name'], $target_path_img6)

  ) 

{

    $resultw = $name." Uploading Success";

 }else{

     $resultw = "not success";
     }

    $path_lmap = 'hotels/'.$name.'/' . $lmap;

    $path_img1 = 'hotels/'.$name .'/'.$img1;
    $path_img2 = 'hotels/'.$name.'/'.$img2;
    $path_img3 = 'hotels/'.$name .'/'.$img3;
    $path_img4 = 'hotels/'.$name .'/'.$img4;
    $path_img5 = 'hotels/'.$name .'/'.$img5;
    $path_img6 = 'hotels/'.$name.'/'.$img6;

$sql="
INSERT INTO helikro.itinerary (
id ,
type ,
name ...

[QUOTE=facarroll;1366735]I just ran this code. The answer was not rounded. (.751)

[CODE]<?php

$qty = 0.1;
$rate = 7.51;

$total = $rate * $qty;

echo $total;

?>[/CODE][/QUOTE]
yes this is working but i want to get values from text box

[CODE]
<?php

$qty = $_post['qty'];
$rate = $_post['rate'];

$total = $rate * $qty;

echo $total;

?>
[/CODE]

i want to print the float number in total but it gives rounded Number

I want to Create a row as the same as above

[CODE]<HTML>
<HEAD>
<TITLE> TESTING</TITLE>

</HEAD>
<BODY>

<INPUT type="button" value="Add Row"/>

<TABLE id="dataTable" width="350px" border="1">
    <tr bgcolor="#0099FF">
<th width="88" bgcolor="#66CCFF" scope="col">Code</th>
<th width="289" bgcolor="#66CCFF" scope="col">Product</th>
<th width="35" bgcolor="#66CCFF" scope="col">Qty</th>
<th width="144" bgcolor="#66CCFF" scope="col">Rate</th>
<th width="146" bgcolor="#66CCFF" scope="col">Value</th>

</tr>

<!----- Same as this Row -----!>
<tr>
<td>

<label>
  <select id="code"  onChange="ajaxFunction()">

    <?php
      while($info=mysql_fetch_array($result1)){
 $id=$info['id'];
 $code=$info['code'];

echo '<option value="'.$id.'">'.$code.'</option>';
}
?>

  </select>
</label></td>
<td><input name="proname" type="text" id="proname" size="50" readonly="readonly" /></td>
<td><label>
  <input NAME="qty" type="text" id="qty" size="2" onchange="CalculateTotal1()"  />
</label></td>
<td><input name="rate" type="text" id="rate"  onchange="CalculateTotal2()"/></td>
<td><input name="tot" type="text" id="tot" readonly="readonly" />

</td>

<!----- END of Row -----!>

</tr>
<tr>
<td> </td>
<td><label>

</label></td>
<td>&nbsp;</td>
<td>Total</td>
<td><input name="textfield4" type="text" id="textfield4" readonly="readonly" /></td>

</tr>
</TABLE>

</BODY>
</HTML>
[/CODE]

[B]This is the code that not getting the result[/B]

[CODE]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Nice select</title>
<script Language="JavaScript">
function checkData()
{

var myTest  = me.D1.value;
 //alert(myTest);

 var req = new Request.JSON({
    url: 'dbselect.php',
    method: 'post',
    data: 'brand=' + encodeURIComponent(myTest)
});
 req.addEvent('success', function(response) {

        var ts = new String(response);
        document.me.inter.value = ts;

});
req.send();

 }

</script>

</head>

<body>
<form method="POST" name="me" id="me">
<select size="1" name="D1" onChange="checkData()">
<option value="99">Default</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>

<input name="inter" id="inter"  type="text" >

</form>
</body>
</html>

[/CODE]

This is the "dbselect.php" this is working well

[CODE]
<?php
include("../init/db.php");
$id=$_POST['brand'];
$sql="SELECT * FROM tea_type
WHERE id = '$id' ";
$data = mysql_query($sql);
while($info = mysql_fetch_array($data)){
$model = $info['product'];

}
echo json_encode($model);
?>
[/CODE]

This is form that i want to submit and send a mail to my email i have used some codes for that and it doesn't work

[CODE]
<form id="F2" name="F2" method="post" action="contact/send_contact.php" onsubmit="return validateForm(this)">
<div id="hedding"> <h2>Contact Details</h2>
</div>
<P><center><?php
error_reporting(0);
include("init/db.php");
$table=$_GET['hotel'];
$id=$_GET['id'];
$sql = "SELECT * FROM $table WHERE id=$id";
$result=mysql_query($sql);

while($info=mysql_fetch_array($result)){
$name=$info['name'];
echo '<h3>'.$name.'</h3><input name="hotelname" type="hidden" id="hotelname" value=" '.$name.'" /> ';
}

           ?></center></P>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td><table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tbody>
                  <tr>
                    <td width="24%"> Name* :</td>
                    <td align="left" width="76%"><input name="name" id="name" size="70" type="text" /></td>
                  </tr>
                </tbody>
                </table></td>
            </tr>
          </tbody>
        </table>
        <table cellpadding="0" cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td colspan="4" height="6"></td>
            </tr>
            <tr>
              <td align="left" valign="middle" width="24%">Phone Number* :</td>
              <td align="left" valign="middle" width="36%"><input name="phone" id="phone" size="15" maxlength="20" type="text" /></td>
              <td align="left" valign="middle" width="14%">Home :</td>
              <td align="left" valign="middle" width="26%"><input name="home" id="home" size="15" maxlength="20" type="text" /></td>
            </tr>
            <tr>
              <td colspan="4" align="left" valign="middle" height="6"></td>
            </tr>
            <tr>
              <td align="left" valign="middle">E-mail * :</td>
              <td align="left" valign="middle"><input name="email" id="email" size="40" type="text" /></td>
              <td align="left" valign="middle"></td>
              <td align="left" valign="middle"></td>
            </tr>
            <tr>
              <td colspan="4" align="left" valign="middle" height="6"></td>
            </tr>
            <tr>
              <td align="left" valign="middle">Fax number :</td>
              <td align="left" valign="middle"><input name="fax" id="txtFax2 " size="15" maxlength="20" type="text" /></td>
              <td align="left" valign="middle"></td>
              <td align="left" valign="middle"></td>
            </tr>
            <tr>
              <td align="left" valign="middle" height="6">Country of Residence</td>
              <td align="left" valign="middle"><select name="country" id="country">
                <option value="" selected="selected">-------------Choose One-------------</option>
                <option value="Sri Lanka ">Sri Lanka </option>
                <option value="Afghanistan">Afghanistan </option>
                <option value="Albania">Albania </option>
                <option value="Algeria">Algeria </option>
                <option value="Andorra">Andorra </option>
                <option value="Angola">Angola </option>
                <option value="Anguilla">Anguilla </option>
                <option value="Antarctica">Antarctica </option>
                <option value="Antigua &amp; Barbudo">Antigua &amp; Barbudo </option>

                <option ...

can any one help me

i got this error in my code in my hosting account plz help ti solve it
[COLOR="Red"][CODE]
"Error connecting the database"[/CODE][/COLOR]

this is my connection codes

[CODE]$MYSQL_SERVER='jsnf.db.6477609.hostedresource.com'; //sessions not need for this one
$MYSQL_USER='jsnf';
$MYSQL_DB='jsnf';
$password='[removed]';
mysql_connect($MYSQL_SERVER,$MYSQL_USER,$password) die("Error connecting the database");
mysql_select_db($MYSQL_DB) die("Error Selecting the database");[/CODE]

this information give me by Hosting account

[CODE]MySQL Database Information
Status:Setup

Host Name:jsnf.db.6477609.hostedresource.com

Database Name:jsnf

Database Version:5.0

Description:Not Set

User Name:jsnf

DSN:mysql_jsnf.dsn
Installed [/CODE]

any one for a help.............

[QUOTE=rajarajan07;1277994]Flash is not connect the backend database directly. you can use JSON to pass the datas between flash and sql with php.[/QUOTE] can you help me for that

HELLO ...........

i want to do a flash movie that if i select a city it gives book dealers list from my SQL database

i have no idea to solve this

i can do the flash thing and c# and sql thins i don't know how to connect those things

are any one can help for this

Helloo

Im new in Databases.
I want to create a simple shopping cart i have a table called product

[CODE]
CREATE TABLE products (
id int(11) NOT NULL AUTO_INCREMENT,
category varchar(150) NOT NULL,
name varchar(100) NOT NULL,
author varchar(100) NOT NULL,
details varchar(10000) NOT NULL,
price int(11) NOT NULL,
imgpath varchar(500) NOT NULL,
dateadded date NOT NULL,
stock int(11) NOT NULL,
PRIMARY KEY (id)
)
[/CODE]

what i want is when i click the add to cart button the product must add to a cart i don't have a idea how to do this

[QUOTE=peter_budo;1097775]How is this relevant to JSP?[/QUOTE]i think progress bar can be creat with JSP

[QUOTE=cwarn23;1097382]That error again, grr. I have read about it and if the file begins with a crc32 hash (I think) then php will end up just dumping an error. Although I have experienced this error myself it doesn't seem to be very common. I think the solution would be to replace the move_uploaded_file() with a custom function and also I would suggest trying the following to see if you get any other error messages too...
[CODE]<?php
ini_set('upload_max_filesize','1000M');
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
move_uploaded_file($_FILES['uploaded']['tmp_name'], $target);
?>[/CODE][/QUOTE] it is nor workin sorry.....

[QUOTE=cwarn23;1097358]Could you please describe in detail what happens when you try to upload. Are their any error messages and if so what messages are shown.[/QUOTE]
ok this is the error

[CODE]Sorry, there was a problem uploading your file.[/CODE]

file size is not the matter i think its file type

[QUOTE=cwarn23;1097237]Try the following:
[CODE=html]<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000000000" />
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>[/CODE][CODE]<?php
ini_set('upload_max_filesize','1000M');
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?>[/CODE][/QUOTE]
thank you for the helping but it doesn't upload flv files

What i want is when i click upload button upload the file with progress bar

[CODE]
<form action="image_upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="filei" id="filei" />
<input type="submit" name="button2" id="button2" value="Upload" />
</form>
[/CODE]

this is my php file

[CODE]

<?php
$name=$_FILES["filei"]["name"];
$size=$_FILES["filei"]["size"];
$type1=$_FILES["filei"]["type"];

$dirpath = "upload/";
//upload image
if ((($_FILES["filei"]["type"] == "image/gif")
|| ($_FILES["filei"]["type"] == "image/jpeg")
|| ($_FILES["filei"]["type"] == "image/pjpeg")|| ($_FILES["file"]["type"] == "image/JPEG")|| ($_FILES["filei"]["type"] == "image/jpg")|| ($_FILES["filei"]["type"] == "audio/mpeg")|| ($_FILES["filei"]["type"] == "audio/x-mpegurl"))
&& ($_FILES["filei"]["size"] < 20000000000000))
{
if ($_FILES["filei"]["error"] > 0)
{
echo "Return Code: " . $_FILES["filei"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["filei"]["name"] . "<br />";
echo "Type: " . $_FILES["filei"]["type"] . "<br />";
echo "Size: " . ($_FILES["filei"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["filei"]["tmp_name"] . "<br />";

if (file_exists("$dirpath" . $_FILES["filei"]["name"]))
  {
  echo $_FILES["filei"]["name"] . " already exists. ";
  }
else
  {
  move_uploaded_file($_FILES["filei"]["tmp_name"],
  "$dirpath" . $_FILES["filei"]["name"]);
  echo "Stored in: " . "$dirpath" . $_FILES["filei"]["name"];
  $ipath = "$dirpath" . $_FILES["filei"]["name"];
  }
}

}
else
{
echo "Invalid file";
}
//end of image uploading
?>

[/CODE]

Can any one modify this code for my work

Form
[CODE]<form enctype="multipart/form-data" action="uploader.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form> [/CODE]

php file
[CODE]<?php
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?> [/CODE]

[QUOTE=cwarn23;1096664]There is a nice [URL="

I need a help to upload mp3 and flv uploading codes can any one help me on this

[QUOTE=Atli;1078690]Hey.

Can you explain this a little better? Just so we know what we are looking for.

The phrase "is not working" (in any form) is a completely useless statement when you are describing your problem. We already know it's not working. That is why you posted it. What we need to know is [i][b]how[/b][/i] it is supposed to be working and how it is actually working.

Thanks :)[/QUOTE]
im sorry about that

in this codes what i want to do is when i selected a value in master (select list/menu) and get the relevant data from db and put in to slave(select list/menu) thi codes are working without jquery.js file but the thing is i want jquery file also
thank you for the reply im sorry im not good in english

[QUOTE=pritaeas;1078655]What is it supposed to do, and is it possible to see it somewhere in action online ?[/QUOTE] im sorry about that what i want is when i select a value in a select (list/menu)
i want to get from relevant data to a another select (list/menu)

but i used this codes in a another place that is working if i removed that two files from my coding then this cods are working but iwant this two files also

here is the files that i used (Attached)

[QUOTE=pritaeas;1078428]Did you check where you copied the files. Maybe they are in a different folder then you specified.[/QUOTE] yes i checked that their is no error in their

This is my codes

[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript" src="js/mootools.js"></script>
<script language="javascript" type="text/javascript" src="js/getchqno.js"></script>
</head>

<body>
<script type="text/javascript">
function buildSelect(select, options)
{
var select = $(select);
select.empty();
options.each(function(item) {
if($type(item) != "array")
{
item = [item, item];
var option = new Element("option", {
text: item[0].toString(),
value: item[1].toString()
});
option.inject(select);
}
});
}

function domready()
{
$('master').addEvent('change', master_changed);
}

function master_changed()

{

var req = new Request.JSON({
    url: 'getowner.php',
    method: 'post',
    data: 'id=' + encodeURIComponent($('master').get('value'))
});
req.addEvent('success', function(response) {
    buildSelect('slave', response);
});
req.send();

}

window.addEvent('domready', domready);
</script>
<form action="" method="post" name="F21" id="F21">
<p>Make
<select name="make" id="master">
<option selected="selected" >d1</option>
<?php
include("init/db.php");
$sql="SELECT *
FROM customers";

    $result=mysql_query($sql);
    while ($info=mysql_fetch_array($result)){
        $id= $info['id'];
        $name = $info['fname']." ".$info['lname'];
        echo '<option value="'.$id.'">'.$name.'</option>';
        }       

    ?>
</select>

</p>
<p>Model
<select name="model" id="slave">
<option>SELECT</option>
</select>
</p>
</form>
</body>
</html>[/CODE]

if i added this two files to this files my codes are not working

[CODE]<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src=".../js/jquery.min.js"></script>[/CODE]

can any one help me to solve this problem i am a new one in JS