PDA

View Full Version : hi i need a help for php my sql


imeshSJ
07-28-2009, 10:03 AM
hi i need a help for php my sql
pls i need a help for php mt sql
ane kavuruth innawada

mawella
07-28-2009, 10:14 AM
:#:#:##

agarp
07-28-2009, 10:26 AM
whats ur problem???
explain briefly

erandap
07-28-2009, 10:31 AM
Hay, I also need a help for PHP.
How i start to develop web page with php? what are the software do i need to install? what are the API for it?

imeshSJ
07-28-2009, 10:42 AM
this is my prob
". i want to change this code to uypload 5 images
pls help me

<?php

//This is the directory where images will be saved
$target = "images/";
$target = $target . basename( $_FILES['photo']['name']);

//This gets all the other information from the form
$name=$_POST['xx'];
$address=$_POST['xx'];
$phone=$_POST['xx'];
$email=$_POST['xxl'];
$mobile=$_POST['xx'];
$type=$_POST['xx'];
$bedrooms=$_POST['xx'];
$bathrooms=$_POST['xx'];
$furnish=$_POST['fxx'];
$pic=($_FILES['photo']['xx']);

// Connects to your Database
mysql_connect("xxxx", "xxxxx", "xxxxxx") or die(mysql_error()) ;
mysql_select_db("navaja") or die(mysql_error()) ;

//Writes the information to the database
mysql_query("INSERT INTO `xxxx` VALUES ('$name', '$address', '$phone', '$email', '$mobile', '$type', '$bedrooms', '$bathrooms', '$furnish', '$pic')") ;

//Writes the photo to the server
if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
{

//Tells you if its all ok
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
}
else {

//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
?>
</body>
</html>"

imeshSJ
07-28-2009, 10:42 AM
meke thiyenne 1 photo ekak.mata onne photo 5 withara upload karala epa sql eke write wennath onne
pls help me

agarp
07-28-2009, 11:04 AM
meke thiyenne 1 photo ekak.mata onne photo 5 withara upload karala epa sql eke write wennath onne
pls help me
first you have to creat a mysql database and the fill the xx with those username password local host thing.

agarp
07-28-2009, 11:05 AM
Hay, I also need a help for PHP.
How i start to develop web page with php? what are the software do i need to install? what are the API for it?
there is a software called xampp download that and install also install mysql
then there is a software called php admin if you want can instal that also.

agarp
07-28-2009, 11:09 AM
to add five images
$pic1=($_FILES['photo']['p1']);
$pic2=($_FILES['photo']['p2']);
$pic3=($_FILES['photo']['p3']);
$pic4=($_FILES['photo']['p4']);
$pic5=($_FILES['photo']['p5']);


//Writes the information to the database
mysql_query("INSERT INTO `xxxx` VALUES ('$name', '$address', '$phone', '$email', '$mobile', '$type', '$bedrooms', '$bathrooms', '$furnish', '$pic1', '$pic2', '$pic3', '$pic4', '$pic5')") ;

create the database proberly to add five images also change all the xxx if you get prob pm me

imeshSJ
07-28-2009, 11:45 AM
thanka lot machan.i will try. if u have gmail or skype id pls give me