nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster
Welcome to Daniweb :)
Thats strange. Put the connection string as 1st line of your code. Is it entering all the other conditions ?
-774
Oops! sorry..
-772
hmm! instead of $con=mysql_connect('localhost','root','password'); give $con=mysql_connect('localhost','root','password') or die(mysql_error());
I dont think establishing the connection is the problem. If that was the problem, you would have got an error message while executing the script. Anyway, change the connection string line as above and try again !
You can ignore notices. If you dont want your script to display notices, you can simply turn the notices off by editing your error_reporting in php.ini file. More on error_reporting here .
And, you can't redirect errors to another page. If you are executing a script and if you encounter errors, the errors are shown in the same page.
:) Good job! Nicely done..
Edit: Even the sliding navigation is good !
Hi every one,
Why I am getting wrong time when I am using date('H:i:s').I am working on localhost.
Please help how to get correct time.Thanks and Regards,
Aravind Kishore.P
hmm.. Because it displays the time in UTC. If you want the exact time, add the time difference using mktime.
Eg.
<?php
echo date("H:i:s",mktime(date("H")+5, date("i")+30, date("s"))); //this will display current indian time because the difference is 5 hrs 30 mins.
?>
Cheers,
Naveen
You mean appendPath will have the value http://example.com and the filename is music.mp3 and you want to append those 2 ? $path=$appendPath."/".$filename;
If that's not what you want, could you explain your question a lil better?
What exactly do you mean by "crashes" ? Doesn't it execute or umm.. or what ?
Why can't you have one textbox and store decimal values in it ? :-/
hie
my fujitsu siemens amilo pro v3515 laptop with vista home basic has been displaying windows resuming when i switch it on ..been going on for 2 days...cannot get any of the keys to do anything...can anyone help?????.. thanx
You need to post this question in hardware forum.
What's in your admin.php page ? Are you checking if the session is valid or it has expired ? The best way to completely destroy the session is to redirect the page after you destroy the session. When the user clicks on the logout link, I do it this way.
<a href="index.php?logout=true">Logout</a>
.....
//in index.php
session_start();
....
if(isset($_REQUEST['logout']) && $_REQUEST['logout']=='true')){
session_destroy();
}
Edit: Or you can do as ryan_vietnow has mentioned.. :) Its much easier way.
If you are storing the banner path in an array, you can use array_rand function to randomise the array. You can also use rand function to generate a random number and fetch that record number from the array.
Since $field4 is storing the path of the image, as Shawncplus has already said, use <img src> tag.
ie.,
<img src="<?php echo $field4; ?>" alt="image" />
Do you mean how can you concatenate $appendimagePath with myFieldName ? $visualpath = $appendimagepath.myFieldName['visual'];
like that ?
Installing Wamp is VERY easy. Just double click the installer and keep hitting "ok" or "next" until the installation is complete. :)
Umm.. echo statements to check the flow of the code. Check if its entering the loops correctly. Check the form variable names. Put print_r($_POST); on top of the page to see if all the form variables are posted properly.
Welcome to Daniweb Seelie :)
:) Welcome to Daniweb Jim!
Welcome to Daniweb!
:) Welcome to Daniweb!
:) Welcome !
:) Welcome to Daniweb!
Intel
leg
lie
Performance
-780
What exactly is the problem ? You can't open the website ? Is the server down ? Call your web hosting company and ask them to solve your problem..
select * from table where keyword like "%$keyword%";
$keyword = user input.
Try this..
<?php
if(isset($_POST['submit'])){
if(!empty($_POST["name"]) && !empty($_POST["pass"]) && !empty($_POST["email"]))
{
$name=$_POST["name"];
$pass=$_POST["pass"];
$email=$_POST["email"];
$con=mysql_connect('localhost','root','password');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("users");
$sql = "INSERT INTO members (username,password,email) VALUES ('$name','$pass','$email')";
$query = mysql_query($sql) or die('Error: ' . mysql_error());
echo "Inserted successfully !";
} else {
echo "Fields can't be empty !";
}
}
?>
<html>
<body>
<form action="register.php" method="post">
Username: <input type="text" name="name" /></br>
Password: <input type="password" name="pass" /></br>
Email: <input type="text" name="email" width=40 /></br>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
:) Welcome to Daniweb!
Welcome to Daniweb!
Welcome to Daniweb Dhaval_Vora :)
So ? what is the problem ?
First of all, you dont have an extension to the file. secondly, you aren't writing anything to the file.
Eg.
<?php
header('Content-Disposition: attachment; filename=filename.txt');
echo "blah blah";
?>
(code=php ) (/code ) without the extra whitespace :-/ .
Anyway, Instead of
VALUES ('$good_data[Custnombre]','$good_data[Custemail]','$good_data[8x10]','$good_data[8x10quantity]', '$good_data[8x12]','$good_data[8x12quantity]','$good_data[10x12]','$good_data[10x12quantity]', '$good_data[12x12]','$good_data[12x12quantity]','$good_data[12x16]','$good_data[12x16quantity]', '$good_data[18x18]','$good_data[18x18quantity]','$good_data[18x24]','$good_data[18x24quantity]', '$good_data[20x24]','$good_data[20x24quantity]','$good_data[24x36]','$good_data[24x36quantity]', '$good_data[24x48]','$good_data[24x48quantity]','$good_data[36x48]','$good_data[36x48quantity]', '$good_data[photorealistic]','$good_data[painted]','$good_data[addsvc1]','$good_data[addsvc2]', '$good_data[addsvc3]','$good_data[addsvc4]','$good_data[imagedetails]', '$good_data[imagefile]','$good_data[fileownership]', '$good_data[shipping]','$good_data[address]')";
Use
$val1, $val2, $val3,... where $val1,$val2,$val3 is $good_data['8x10'],$good_data['Custemail'], etc..
http://www.tizag.com/phpT/fileupload.php In this example, in move_uploaded_file function, look at $target_path. That's the path. Save that in the table.
-755
Assign all these values '$good_data[Custnombre]','$good_data[Custemail]','$good_data[8x10]','....
to a variable and try again! And, shouldn't it be $good_data instead of $good_data[8x10] ?
Btw, next time you post your code, please post it within [/code ] tags.[code =php] [/code ] tags.
however from second page link to the 3rd page, $_SESSION cant be shown anymore, there is just a blank.
As buddylee has mentioned, you need to have session_start on top of every page. And also, check if $_SESSION is over-written by any other variable (so that $_SESSION is null)!
I wanted to how do we upload an image path(url) into the MySql database and call it through PHP.
When you upload an image, you upload it to a path. Store the path in a variable and at the time you upload, insert a record to the table containing the path.
Do we use the BLOB function, if yes, then how?
Nope. If you are uploading only the path, a fieldname of datatype varchar will do. eg. varchar(100).
I don't want to upload the image itself as it will burden the database.
Exactly ! Its not a good idea to upload images to the database.
:) I was wondering what was wrong !
Nothing wrong with line 4.. Check if the image exists and the path is correct.
Edit: Dang! I didn't see your last post..
Hello turtlelove. First of all, welcome to Daniweb.. And, there are many 'learn yourself', 'for dummies', etc books which are good for beginners. Pick up one and start learning! Good luck.. :)
:) Welcome to Daniweb!
Welcome to Daniweb Susie :)