|
Hi all,
I have some data collected from database using PHP and now i want to export it to PDF.Is there any third party tool using which i can create the pdf file with any fonts,styles etc....
Thanks in advance.
|
|
|
|
|
|
I've experimented with FPDF, and it worked as expected.
|
|
|
|
|
hello every body
I want to join MS SQL with php
|
|
|
|
|
|
and use XAMPP bundle to install all in one pack.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I'm new to PHP and I'm trying to build a simple library interface...
For that I need a html form that has a text input for "keyword" and another for "author"
I am hoping to split (a) "keywords" by the regular expression ";", and (b) the "authors" by the regular expression ";", to separate one author from another and then by the regular expression "," to separate the array into two separate arrays - Surname and Firstname (for the MySQL Table Author). I will also want to include in each INSERT INTO query, another variable (from the same form), being the ID_Number of the book or article...
So, I am thinking if I used preg_split(";") for both (a) & (b) to give an array, say for table (a) Keyword
<?php
$keyword = preg_split(";",'$POST_[keywords]',-1,PREG_SPLIT_NO_EMPTY)
mysql="INSERT INTO Keyword (Keyword, ID_Number) Values
(FOREACH '$keyword', '$POST[ID_Number]')";
I'd dearly love some feedback, I'm trying to teach myself this on the fly If I can work out the first one (with only one split) then I can work on the nested array(s) and splitting the $author array into the same. The alternative is one ugly XHTML form, which I'd rather avoid.
|
|
|
|
|
Hi, what you are trying to do it right. You can go with that pattern. You want some improved version then you can refer this link. http://php.net/manual/en/function.preg-split.php[^]
They have included good number of example also. If you have already refer that page and you din't get any example then mention it so we can explain it.
|
|
|
|
|
Thanks for the reply, seems I've scared some people off - all I need is to split the HTML variable strings by one regular expression ";", that is what I've requested people use when using the form (and if they don't they don't)...
So if I do something along the lines of this:
$Authors = $_POST["Authors"];
$keywords = $_POST["keywords"];
$ID_Number = $_Post["ID_Number"];
$keyword = preg_split(";",'$POST_[keywords]',-1,PREG_SPLIT_NO_EMPTY)
mysql="INSERT INTO Keyword (Keyword, ID_Number) Values
(FOREACH '$keyword', '$POST[ID_Number]')";
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error()); }
echo "Table: Keyword Updated";
$author = preg_split(";",'$POST_[Authors]',-1,PREG_SPLIT_NO_EMPTY)
mysql="INSERT INTO Author (Author, ID_Number) Values
(FOREACH '$author', '$POST[ID_Number]')";
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error());}
echo "Table: Author Updated";
I should not only get the results I want (in both cases, in each table, a row with both the array item (Author or Keyword) and the ID_Number? If so, that will be wonderful, that is PRECISELY what I need... That plus the feedback for each table should be good - I can always remove that later, first of all I have to get the code to work 
|
|
|
|
|
hey guys,
Help me out this pliz,
I want to capture the system time and save that in a text file as a numeric value.
Do you got any idea of how this can be done?
|
|
|
|
|
|
Here:
$file = "output.txt";
$f = fopen($file, 'w');
$date = date("G:i:s A");
fwrite($f, $date);
fclose($f);
check the php manual for more formats for the date function
nocturnal
|
|
|
|
|
Thanks Guys, am getting somewhere.
I want also to include centiseconds and i tried this
$date = date("G:i:s:u");
which gives something like this
16:53:10:000000
instead of digits
|
|
|
|
|
Hi everyone,
I have a task to convert the code written in VB to PHP.
Can anyone suggest me the process.
Please help....
Thanks in advance
|
|
|
|
|
kpuneeth7 wrote: Can anyone suggest me the process.
[sarcasm] The best way is to ask in as many forums as possible and annoy as many people as possible, maybe finally they are fed up enough to help you. [/sarcasm]
Now seriously, which part of "Do not cross-post!" don't you understand?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Thanks for ur sarcasm....
But if u are aware i have already deleted my previous post wic i had posted in the VB forum....
See properly and then post dude....
Even i know to speak sarcasm and seriously
|
|
|
|
|
Sorry if i was rude....
But i was extremely tensed with my task.
I was expecting some help, but i get to see such posts, i got tempted.
SOrry once again....
Good bye to this forum....
|
|
|
|
|
Hi guys,i need a PHP script for my project in which i have to demonstrate how examination results of any school or university are stored and fetched from a web-server using PHP and MYSQL.I've read "PHP for dummies" almost but can't find my solution.
Plz can anyone give me a ready script for my project and also any good book in which able to make complex applications myself.
|
|
|
|
|
Aren't you the guy, that asked the same thing in Quick Q&A? I told you there, that nobody will give you the script. It's your task, so do it yourself. If you have a specific problem, people will help you, but they are not going to do your work.
peter432 wrote: I've read "PHP for dummies" almost but can't find my solution.
Then maybe you have to do some further reading?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
For your second question my answer is http://php.net and google.com
the answer for your first question is when have started my first point then you would be ready to find the solution for your first point.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I got a form with the method POST , the action sends a VAR to a someone URL out of my host, this var creates an XML into the URL out of my host.
how can i read the XML if i try with simplexml_load_file($url_out_of_my_server) but it returns 0
how can i do.
|
|
|
|
|
I am not sure you can do that, sound like your are sending post data to a sever that is not yours and/or you do not have access to files on that server. This also sound like cross-site scripting...a big NO NO for security reasons.
|
|
|
|
|
hi, in the first part you have a reason , but now i can do it by the CURL, send a post data and i get the answer in the same page without refresh etc.
thanks
|
|
|
|
|
you have three main functionality to do this.
1.fsockopen, 2.file_get_contents and the third is CURL.
for the first two you need to remove the headers in the response.
were as in curl you will get only the body of the response and not the header.
Now you can use xmldom functions to manipulate xml data.
Use php.net and google to fine some info.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Hi, yeah! i make it with CURL!
Thanks
|
|
|
|