|
I don't think that its a good idea to store the image into database rather you can store the image src into database. Just call the src whenever you need and put it into the img tag.
--
Regards
Rony Sur
Senior Software & Application Developer
Frost & Sullivan Pvt Ltd
rony.sur007@gmail.com
|
|
|
|
|
Please tell me total procedure how to install Xampp or Lamp in Ubuntu8.
|
|
|
|
|
|
WAMP and XAMP both are specifically designed for windows os.
What you need to understand is what is WAMP:
W=windows.
A=Apache
M=MySQL
P=PHP
For your ubuntu all you need to do is install
1. Apache
2. MySQL
3. PHP
read this blog[^]
I wish I could believe there is an after life.
|
|
|
|
|
Sorry but I must say that you are not 100% right.
WAMP is for Windows os .... Right
XAMPP is for Windows os .... Not 100% Right
It designed for cross platform means it will work both in Windows & Linux.
LAMP is for Linux os
--
Regards
Rony Sur
Senior Software & Application Developer
Frost & Sullivan Pvt Ltd
rony.sur007@gmail.com
|
|
|
|
|
First download exe file for xampp and after that you can simply install xampp with double clicking on exe file. And give the path where you want to install
modified 9-Sep-14 7:59am.
|
|
|
|
|
I am using iframe to display other's webpage in my webpage in that other's page user give's his data and submit it on other's webpage, after that it gives some result, How can i get the data from the other's page, i am using PHP.
|
|
|
|
|
multiple posting is annoying.
I have left you a reply in 'Web Development'
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Hi experts,
I want to attach a homebrew device to the IRDA connector of my Ubuntu PC's motherboard.
How do I send and receive on byte level over that port?
Can I simply open the file /dev/ttyS0 and read/write from/to it?
Is there a bash way to achieve this?
Ciao,
luker
|
|
|
|
|
lukeer wrote: Is there a bash way to achieve this?
echo foobar > /dev/ttyS0
Use the best guess
|
|
|
|
|
Hello,
I am pretty new to php and i am trying my hands on something little but i"m getting a persistent error.
I am trying to insert a record into the database but i keep getting the error saying the record wasn't inserted.
i checked the databse and there's really nothing there.
Below is the php code. Please let me know the error and guide me through the changes.
<?php
$host = 'localhost';
$user = 'admin';
$password = '12345';
$database = 'staff_db';
$conn = mysql_connect($host,$user,$password) or die('Error: Could not connect to database - '.mysql_error());
mysql_select_db($database,$conn) or die('Error in selecting the database: '.mysql_error());
$title = mysql_real_escape_string(filter_var(trim($_POST['Title']), FILTER_SANITIZE_STRING));
$fname = mysql_real_escape_string(filter_var(trim($_POST['FirstName']), FILTER_SANITIZE_STRING));
$mdname = mysql_real_escape_string(filter_var(trim($_POST['MiddleName']), FILTER_SANITIZE_STRING));
$lname = mysql_real_escape_string(filter_var(trim($_POST['LastName']), FILTER_SANITIZE_STRING));
$res_add = mysql_real_escape_string(filter_var(trim($_POST['Resid_Add']), FILTER_SANITIZE_STRING));
if(! $res_tel = mysql_real_escape_string(filter_var(trim($_POST['Resid_Tel']), FILTER_SANITIZE_NUMBER_INT)))
{
echo 'Please enter a valid telephone number.';
};
if(! $mobile = mysql_real_escape_string(filter_var(trim($_POST['Mobile']), FILTER_SANITIZE_NUMBER_INT)))
{
echo 'Please enter a valid mobile number.';
die();
};
if(! $email = filter_var(trim($_POST['Email']), FILTER_VALIDATE_EMAIL))
{
echo 'Please enter a valid email.';
die();
}
$sql = 'INSERT INTO `$database`.`Emp_Details` (
`Title` ,
`First_Name` ,
`Middle_Name`,
`Last_Name` ,
`Res_Add` ,
`Res_Tel` ,
`Mobile` ,
`Email`
)
VALUES (".$title." , ".$fname." , ".$mdname.", ".$lname.", ".$res_add.", ".$res_tel.", ".$mobile.", ".$email.")';
if(mysql_query($sql))
{
echo 'User information saved successfully.';
}else
{
echo 'Error: We encountered an error while inserting the new record.';
}
mysql_close($conn);
?>
Thanks.
|
|
|
|
|
You should use mysql_error() to see the reason why the query failed, but my guess is that it will say something like "table $database.Emp_Details does not exist".
You have used single quotes to surround your query, but PHP does not replace variables inside a single-quoted string - use double-quotes, or concatenate strings using the "." operator.
|
|
|
|
|
Thank you for your response.
I have tried what you said but its still not working.
|
|
|
|
|
What does the error message you got from mysql_error() say?
If you converted the outer quotes to double-quotes, did you then single-quote the values in the query?
|
|
|
|
|
thanks soo much for your help graham..... i got it now. Thanks
|
|
|
|
|
Transactions ID and Quantity is working! But tax, shipping and Revenue not working!
This is my php code:
<?php
$gaorder="<script type='text/javascript'> ";
$gaorder=$gaorder."var _gaq = _gaq || []; ";
$gaorder=$gaorder."_gaq.push(['_setAccount', 'UA-32542684-1']); ";
$gaorder=$gaorder."_gaq.push(['_trackPageview']); ";
$tax=($totalCost/100)*5;
$gaorder=$gaorder."_gaq.push(['_addTran','".$code_order."','haxata.com','".$totalCost."','".$tax."','0','ThanhPho','Tinh','VietNam']); ";
global $db;
$db->getConnect();
while($row = mysql_fetch_array($result))
{
$gaorder=$gaorder."_gaq.push(['_addItem','".$code_order."','".$row[Product]."','".$row[Name]."','".$row[Name]."','".$row[Cost]."','".$row[Number]."']); ";
}
$db->closeConnect();
$gaorder=$gaorder."_gaq.push(['_trackTrans']); ";
$gaorder=$gaorder."(function() {";
$gaorder=$gaorder."var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ";
$gaorder=$gaorder."ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';";
$gaorder=$gaorder."var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);";
$gaorder=$gaorder."})();";
$gaorder=$gaorder."</script>";
echo $gaorder;
?>
Please help me! thank you so much!
|
|
|
|
|
I would like to get the sum of all the fields in columns. where columns are dynamic even the rows are dynamic.
Hi here in my table the user can add column's dynamically, so i won't be knowing the columns name to raw code initially as $row['SUM(price)']. Hence I need a query which can pull by itself all the column values
|
|
|
|
|
Even if you don't know how many column and how many rows are there going to be even though you can establish certain rule. Try to establish the rule. and you can browse all row and column through javascript
I wish I could believe there is an after life.
|
|
|
|
|
how to implement like this:
$classname = "dsa";$ob = new $classname();
i just have a var of the class name and how to new the class?
|
|
|
|
|
You have the right syntax for doing that in your example.
There are some helpful functions for working with classes: Class functions[^].
The class_exists[^] function is useful for checking if you have a valid class name.
|
|
|
|
|
|
Hello masters of web developing. I have an average experience in C# and I like to know that how much does it take to be a great developer in PHP by considering that I put my time on this 24/7. Why I didn't choose ASP.NET is that I think it is much time consuming than learning PHP and I like to work with current famous CMSes like Wordpress and Drupal.
|
|
|
|
|
How long is a piece of string?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Tie both ends together and ask again!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
In my php file called "account.php" I have
<html>
<body>
<link rel="icon" type="image/gif" href="favicon.gif" />
<div id="main-box">
<ul>
<li class="buttons">
="button"="account"="Get Your Account"="#"
</li>
</ul>
</div>
</body>
</html>
I want it so when the user clicks the button, a text box appears and displays ONE line from the text file and when they view it, it deletes it from the text file.
text.txt
Eddie
Apples
Hello
People
So after the user clicks the button it displays "Eddie" line to them and then deletes it after the user sees it so that the next line "Apples" would then become the first line.
If you don't understand my question then please let me know and I will try to explain further. Thank you. 
|
|
|
|