EzwanAbid Posted December 26, 2012 Share Posted December 26, 2012 I'm having a problem here which I don't know how to bring data that pass by url and send to PHPWord, so that the passed value can be use as data in my PHPWord.. My system will be accessed by lots of user, and I want to bring the current student info after I click "generate letter" that locate bottom of the queue list for each person.. The data that I want from webpage is : fullname, student_id, ic_number, course, After clicking the "Generate Letter", the PHPWord will print the data according to the selected student in the list : (example) student name = Ezwan Abid student_id = 05-201005-00018 ic_number = 12-121212-1212 course = IT - Software and all those data above ( from the 'queue' list html page ) will bring the data to PHPWord and be printed. Hope someone can help me ASAP. :-\ I already upload the file that contain the code : ApprovedLetter.php = Display the student data that already request a certain letter. The data will be display in table as queue list. KebenaranProjek-code.php = PHPWord code that contain mysql to bring data from database. KebenaranProjek-code.php ApprovedLetter.php Quote Link to comment Share on other sites More sharing options...
Christian F. Posted December 26, 2012 Share Posted December 26, 2012 You do this like you'd send any other value to PHP: By using GET or POST. How it's handled after PHP receives it, is completely up to you, and totally independent of the delivery method. You have to separate the different problems from each other, otherwise it will be come too complex and thus insurmountable. What you have here are two problems: Sending a value from a client to PHP. A already solved problem, and the reason PHP came into being in the first place. Adding variable content to a word document, with PHPword. Once you've solved each problem on their own, you can combine them to get the proper functionality you desire. Quote Link to comment Share on other sites More sharing options...
EzwanAbid Posted December 26, 2012 Author Share Posted December 26, 2012 Thank you Christian F for your reply.. You do this like you'd send any other value to PHP: By using GET or POST. How it's handled after PHP receives it, is completely up to you, and totally independent of the delivery method. You have to separate the different problems from each other, otherwise it will be come too complex and thus insurmountable. What you have here are two problems: Sending a value from a client to PHP. A already solved problem, and the reason PHP came into being in the first place. Adding variable content to a word document, with PHPword. Once you've solved each problem on their own, you can combine them to get the proper functionality you desire. Yes, that's the problem .. I can't just use POST and GET to receive selected student data into word document, or maybe my code are wrong.. Is there any solution that I can use to bring selected student data into word document? That's my biggest problem now. Quote Link to comment Share on other sites More sharing options...
EzwanAbid Posted December 26, 2012 Author Share Posted December 26, 2012 Ah, forgot to ask you,, can 1 Foreign key value have more than 1 data of row by using the same 1 Foreign Key value : Examples : Student table : student_id (PK ) [with value 05-201005-00018] surat table : 1. student_id (FK) [with value 05-201005-00018] + [type_of_letter= TamatBelajar] 2. student_id (FK) [with value 05-201005-00018] + [type_of_letter= ExamAkhir ] What I mean here, 1 value from PK, then we use the same PK=FK value but have different data in 'surat' table that is the data in the 'type_of_letter' column.. because 1 student may request more than 1 kind of letter. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.