|
|
I wouldn't worry about a PHP currency converter, but about the missing keyboard-keys, if I was you.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Currently I'm develop an application same as CRM. To generate report in PDF,i'm using FPDF as my tools. The problem is, to retrieve the data from database,I create temporary file e.g:dldata.php and call that page in my pdf viewer file. U can access the data and easily view the actual data(if you know the address).By using explode(),I retrieve the data and display it on my pdf viewer page. The dldata.php will be delete (using unlink()) after user load the quotation form. Below are the flow to create quotation in pdf:
fill form data(createquotation.php)->insert data to database->create session,dldata.php & write data into it from mysql->redirect page to viewquotation.php(here I call dldata.php)->click print quotation or back to createquotation.php & destroy dldata.php. Anyone that have experience using FPDF to advise me about this issue. I'm afraid the conflict arise when 2 or more users doing the same process at the same time. TQ.
|
|
|
|
|
What is your actual problem?
Creating the PDF File?
or
Downloading the PDF File?
|
|
|
|
|
I have no problem with either download or creating the pdf file. The problem is method that i used. I used this code to call dldata.php after i create it.
$pdf = new PDF();
$header = array('Product ID', 'Product No', 'Product Description', 'Subtotal#39;);
// Data load from the file and it will be=>1;#13,21321;Pencil;$1.00
$data = $pdf->LoadData('dldata.php');
I followed tutorial based on fpdf official website.
Tutorial:
http://www.fpdf.org/en/tutorial/tuto5.htm[^]
Example for dldata.php shape of data:
http://www.fpdf.org/en/tutorial/countries.txt[^]
After load back to the createquotation.php,I destroy dldata.php file. I'm afraid, it will be issue if more than 2 user do this process at the same time. It will be last in,first out. Only The last data store will be appear. Can I just use dldata.php without delete it and call the data without any user can access it by type the url.
|
|
|
|
|
Click Here to review of Python Tools for Visual Studio
|
|
|
|
|
Please don't do this. Unless your post adds value to a question, don't go linking to external websites. If you do, your account will be banned and your IP will be tracked. Repeated violations will see your IP being permanently banned.
|
|
|
|
|
Hi,
Just have set of around 100 xml files that need to be displayed on HTML.
Each file consists of same 40 elements and then sub elements as well. While looking for the best way to display the xml in html - i found w3s solution i.e.
http://www.w3schools.com/xml/xml_to_html.asp[^]
But this process is quite cumbersome. I mean, if i go with this process, I have to enter all the elelments and sub elements name and then only i can get that to display my xml in html.
Is there any other way, that can read the xml file itself and display each elements and sub elements in html ??
Thanks
Andyyy
|
|
|
|
|
You might want to look into using XSLT for translating your XML into something HTML friendly.
|
|
|
|
|
yes, php has a new (to me) class you can read about it here. http://www.php.net/manual/en/class.domdocument.php[^]
I found it very easy to use on html sources. But if you look in the comments you will see some examples of how xml to html can be done.
Chris J
www.redash.org
|
|
|
|
|
Recently had a similar challenge. You might try checking out IBM's site by searching for xml parsing techniques. My files were huge and the solution I worked out performs extremely well and quickly.
Timoteui
|
|
|
|
|
I have a OpenGL project in Microsoft Windows . I want to port it to linux .
any solution?
thnx
|
|
|
|
|
Since it's OpenGL there should be a linux variant. See here[^]
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
I am using C#.Net in Microsoft Windows XP Operating System.
Now I should switch to linux.
I find Mono as a development tools and C# compiler in linux.
can any one help me about mono?
any one who have experience with mono
is that stable and reliable?
|
|
|
|
|
Hi,
This is simple guide for begin with!
http://www.go-mono.com/md/screencasts/SimpleGui.ogg
Slightly different from Visual Studio.
/F
|
|
|
|
|
See here[^]
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
mohammad masood ashrafi wrote: is that stable and reliable?
It's not experimental software, and they do release a stable build now and then.
You'll find that most stuff is available, up to .NET 4.0. The MonoDevelop IDE doesn't come with a WinForm-designer, you'll have to build your forms from code, or switch to GTK# which would come with a small learning-curve because it works a bit different from WinForms.
Bastard Programmer from Hell
|
|
|
|
|
|
I have written a login page but each time I login it returns a blank page even with a wrong password please help:
the login page is as follows:
<body>
<div id="wrapper">
<form action="methods/login.php" method="post">
<ul>
<li><label>Username:</label><input type="text" name="username" size="10" value="<?php echo htmlentities("$username"); ?>" /></li>
<li><label>Password:</label><input type="password" name="password" size="10" value="<?php echo htmlentities("$password"); ?>" /></li>
<li><input type="submit" name="login" value="Log In" /></li>
<li><input type="submit" name="join" value="Join" />
</ul>
</form>
</div>
</body>
</html>
and the php login script is
<?php
require_once("../includes/ikobe.php");
if (isset($_POST['username']) &&isset($_POST['password']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$pass = sha1($password);
if (!empty($username) &&!empty($password))
{
$query = "SELECT 'id' FROM 'users' WHERE username= '$username' AND password='$pass'";
if ($query_run = mysql_query($query))
{
$query_num_row = mysql_num_rows($query_run);
if ($query_num_row==0)
{
echo 'Invalid username / password combination';
}
else if ($query_num_row==1)
{
echo 'ok.';
}
}
}
else
{
echo 'You must supply a username and password.';
}
}
?>
any help will be greatly appreciated
|
|
|
|
|
I believe your MySql query may be failing, causing you to see nothing other then a blank page. Your code seems weird to me as you escape strings the same way as you do column names and table names, which is a nono for MySQL.
If you want to escape table / column names use the query below instead.
"SELECT `id` FROM `users` WHERE username= '$username' AND password='$pass'"
|
|
|
|
|
I have changed the query script and done a var_dump it returns the values entered but it still does not run the query script even with a wrong password.
-<?php
require_once("../includes/ikobe.php");
if (isset($_POST['username']) &&isset($_POST['password']))
{
$username = $_POST['username'];
$password = $_POST['password'];
var_dump($username,$password);
$pass = sha1($password);
if (!empty($username) &&!empty($password))
{
$query = "SELECT 'id' FROM 'users' WHERE username= '$username' AND password= '$pass'";
if ($query_run = mysql_query($query))
{
$query_num_row = mysql_num_rows($query_run);
if ($query_num_row==0)
{
echo 'Invalid username / password combination';
die();
}
else if ($query_num_row==1)
{
echo 'ok.';
}
}
}
else
{
echo 'You must supply a username and password.';
}
}
?>
No idea how because if you dont enter any fields it returns the error of supply username and password?
any help anyone ??
|
|
|
|
|
The default PHP.INI error notify settings are set to NOT DISPLAY. Check out DEVELOPER SETTINGS in error notify and enable it. By default the production setting is recommended.
Also instead of tightly locking your application to MySQL, use Adodb Abstraction Library for PHP (http://adodb.sourceforge.net/[^])
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
<?php
require_once("../includes/ikobe.php");
if (isset($_POST['username']) && isset($_POST['password'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$pass = sha1($password);
if (!empty($username) && !empty($password)) {
$query = "SELECT id FROM users WHERE username = '$username' AND password='$pass' LIMIT 1";
$query_run = mysql_query($query);
$query_num_row = mysql_num_rows($query_run);
if (mysql_num_rows($query_run) == 0) {
echo 'Invalid username / password combination';
} else {
echo 'Ok.';
}
} else {
echo 'You must supply a username and password.';
}
}
?>
That should work I think.
- Removed quotes from 'id'
- I added "LIMIT 1" to your query to only return a maximum of one result.
You should also:
- "Salt your passwords"
- Clean Input using mysql_real_escape_string()
|
|
|
|
|
Thanks alot for all the input I have tried a couple of the solutions. I have had different outcomes
with the same result. At the moment I am using Marc Firth's solution and getting
"-Invalid username / password"
with a wrong or correct password.
With no values entered it returns
"You must supply a username and password."
Am not really good at reading and understanding the "IF" "ELSE" working but would appreciate if someone
gives a clue to what to do.
|
|
|
|
|
Try to output the hashed (sha1) password, and compare it to the one in the database. i.e. for user "joe" with password "bloggs" run the following code and compare the output to the mysql query below
First get the hash you are creating when you log in (notice the "die"):
<?php
require_once("../includes/ikobe.php");
if (isset($_POST['username']) && isset($_POST['password'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$pass = sha1($password);
die($pass);
if (!empty($username) && !empty($password)) {
$query = "SELECT id FROM users WHERE username = '$username' AND password='$pass' LIMIT 1";
$query_run = mysql_query($query);
$query_num_row = mysql_num_rows($query_run);
if (mysql_num_rows($query_run) == 0) {
echo 'Invalid username / password combination';
} else {
echo 'Ok.';
}
} else {
echo 'You must supply a username and password.';
}
}
?>
Then compare it to the one in the database:
<?php
$query = "SELECT password FROM users WHERE username = 'joe' LIMIT 1";
$query_run = mysql_query($query);
while($row = mysql_fetch_array($query_run)){
echo $row['password'];
}
?>
The two results should match.
|
|
|
|