bintech21 Posted May 14, 2020 Share Posted May 14, 2020 Hi, Is it possible to create an web-page,form,that would accept specific input and generate an XML file from it.The form has to have the ability to add items in one particular section(where we can add additional streams) and give us the ability to remove streams as well. For each stream we must be able to attach a logo for that stream as well. Xojo or Php for this could be used, below is the sample XML file and Data Format. <?xml version="1.0" encoding="UTF-8" ?> <collectionList> <grid class="5ColumnGrid"> <section> <lockup onselect="playMedia('https://player.vimeo.com/external/187143276.m3u8?s...')"> <img src="/resources/images/lockups/shelf1.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 1</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/184669023.m3u8?s...')"> <img src="/resources/images/lockups/shelf2.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 2</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/181758939.m3u8?s...')"> <img src="/resources/images/lockups/shelf3.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 3</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/180890459.m3u8?s...')"> <img src="/resources/images/lockups/shelf4.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 4</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/180014530.m3u8?s...')"> <img src="/resources/images/lockups/shelf5.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 5</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/178583018.m3u8?s...')"> <img src="/resources/images/lockups/shelf6.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 6</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/178457098.m3u8?s...')"> <img src="/resources/images/lockups/shelf7.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 7</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/177558935.m3u8?s...')"> <img src="/resources/images/lockups/shelf8.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 8</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/173738601.m3u8?s...')"> <img src="/resources/images/lockups/shelf9.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 9</title> </lockup> <lockup onselect="playMedia('https://player.vimeo.com/external/187143276.m3u8?s...')"> <img src="/resources/images/lockups/shelf2.png" width="308" height="308" /> <title class="showTextOnHighlight">Title 10</title> </lockup> </section> </grid> </collectionList> </stackTemplate> </document> If Yes, then how to write the desired PHP code to solve this problem? Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted May 14, 2020 Share Posted May 14, 2020 Yeah. Sure. Of course it's possible. Are you able to generate an HTML page that outputs what you want? It's not that hard. If you can do that then you can generate an XML page. Give it a shot, and if you have problems with your code then post it here with a description of what's wrong and we can help you with it. Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 16, 2020 Author Share Posted May 16, 2020 I just could write below HTML web page but donot know how could i code further to resolve this issue?- <!DOCTYPE html> <html> <head> <title>Form</title> </head> <body> <form> a media URL:<br /> <input type="text" /> <br /><br /> an Image:<br /> <input type="file" /> <br /><br /> Title:<br /> <input type="text" /> <br /><br /> <input type="submit" /> </form> </body> </html> Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted May 16, 2020 Share Posted May 16, 2020 That's a step in the right direction but you still have a ways to go. We aren't going to write this code for you, and people generally are not willing to guide you every single step of the way. You need to show initiative and a willingness to learn. So keep going. You're doing fine so far. You will need to learn some PHP. It also seems like you're going to be dealing with file uploads, which PHP can certainly do, but I didn't get the impression that you needed it for this. Then again, you didn't really go into any sort of detail explaining how this work or what it is all about, so I don't know. Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 18, 2020 Author Share Posted May 18, 2020 but i don't know how could i write code further that is why i was looking experts advice here. so could someone please guide how to proceed further? Quote Link to comment Share on other sites More sharing options...
requinix Posted May 18, 2020 Share Posted May 18, 2020 If you don't know any PHP then the first step is to learn some PHP. There are plenty of resources on the internet to do that, and you're going to be the one who knows what learning style works best for you. Maybe you like those online "academy" things. Or maybe YouTube videos. Or maybe online tutorials. They're all different styles for different people. Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 18, 2020 Author Share Posted May 18, 2020 that i know but can't some expert help here for resolving this issue? Quote Link to comment Share on other sites More sharing options...
gizmola Posted May 19, 2020 Share Posted May 19, 2020 7 hours ago, bintech21 said: that i know but can't some expert help here for resolving this issue? To be clear, is this list supposed to persist between runs? You use the form today, but tomorrow if you use it, is it the same as yesterday, or is it empty? Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 21, 2020 Author Share Posted May 21, 2020 It should be the list that we modified the day before. Quote Link to comment Share on other sites More sharing options...
gizmola Posted May 22, 2020 Share Posted May 22, 2020 21 hours ago, bintech21 said: It should be the list that we modified the day before. So now you need some sort of persistence mechanism. This is a small application that requires some programming to accomplish. I have known people to write a lot of code to help out people in the past, but generally speaking, you have to come with some code, and some aptitude for learning, and some desire and elbow grease. I am not sure how we could help you further, that doesn't involve us writing your small web app for you. I can say this structurally, that this is very similar to and could be based on a mysql backed todo list application. Todo lists are frequently used as basic programming proficiency projects, so there are probably some you can find that you could make minimal modifications to and get a big jump start on this: You need a simple database or other persistence solution. Most people would use MySQL. Alternatively, you could persist the data as a file. I'd probably use json format, but then you would need to deal with file io routines. If you did use a database, the database for this system only needs a single table, so that's good from a simplicity standpoint You need an entry form that displays the current list of items from the database, and lets you add, edit, or delete and optionally reorder items. The same form can have a generation button that goes through the list of database items and generates the xml file I don't know if, like RSS this xml file needs to be available at a url or you actually need to generate the xml as a downloadable file, although there's not much difference between the 2. Still it does matter. The image paths are ambiguous. Are these images that should be hosted on your server? The relative paths suggest that is the case, but you didn't specify. If you need to be able to upload images and set that attribute from a list of images, then you need a subsystem/feature that lets you submit an image through the form, and a feature that allows you to pick from the list of pre-existing images when you create or edit an entry. It's a good chunk of work, and maybe a day (non optimal time) project for an experienced programmer. If you're learning, I will say it sounds like a cool project. If there is some specific thing that doesn't involve asking someone to write this for you, please let us know. Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 22, 2020 Author Share Posted May 22, 2020 i am not sure how could i proceed further as so far I could just write below HTML web page but do not know how could i code further to resolve this issue?- <!DOCTYPE html> <html> <head> <title>Form</title> </head> <body> <form> a media URL:<br /> <input type="text" /> <br /><br /> an Image:<br /> <input type="file" /> <br /><br /> Title:<br /> <input type="text" /> <br /><br /> <input type="submit" /> </form> </body> </html> Thanks Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 22, 2020 Author Share Posted May 22, 2020 "this xml file needs to be available at a url or you actually need to generate the xml as a downloadable file, although there's not much difference between the 2. Still it does matter." ..>Images posted on server, xml file as a downloadable file "The image paths are ambiguous. Are these images that should be hosted on your server? The relative paths suggest that is the case, but you didn't specify. If you need to be able to upload images and set that attribute from a list of images, then you need a subsystem/feature that lets you submit an image through the form, and a feature that allows you to pick from the list of pre-existing images when you create or edit an entry." ..>relative path and we will provide the image name and location Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 22, 2020 Author Share Posted May 22, 2020 ...also I am not expert but eager to learn with the help of experts from this forum , so request experts,could you please guide me how could i proceed step by step to resolve it :- Thanks Quote Link to comment Share on other sites More sharing options...
gizmola Posted May 22, 2020 Share Posted May 22, 2020 A step by step tutorial on how to build your specific application is the same as writing it for you. Nobody is going to do that. You are going to have to learn some PHP. I already suggested to you that a TODO list app is very similar to what you need. Here's a tutorial in 3 or 4 parts that covers building a UI, making Ajax calls, writing PHP scripts to persist the data in MySQL and writing the persistence code using the PDO api. My suggestion to you would be to follow this tutorial and see if you can build it. At that point, you would be able to take the TODO app, and tweak it to fit your application. Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 24, 2020 Author Share Posted May 24, 2020 Thanks for this link,but i have some questions like:- 1) i don't have any database so where should i create this SQL table and considering my problem what should be my SQL query for the same? even if we make this SQL query any how then where to store this data? and how to and where to execute this SQL query do i need some specific software for the same? Currently i just have 'Xampp' installed on my computer also i run some test php programs under htdocs folder. 2) How to generate XML from this based on my problem statement? Thanks much... Quote Link to comment Share on other sites More sharing options...
gizmola Posted May 24, 2020 Share Posted May 24, 2020 You have Xampp, so you do have a database. The 'M' in Xamp stands for MySQL database. You can use the phpMyAdmin that is installed with your Xamp to create the tables. Again, you have to learn something about MySQL and the SQL queries, but as they will be very simple as far as SQL goes, that should not be a problem. Let's assume you name your table Medialist... All you will need is: SELECT * FROM Medialist INSERT INTO Medialist (columns..) VALUES (?, ?, ?...) DELETE FROM Medialist where id = ? UPDATE Medialist set column = ? where id = ? The basics of doing this is covered in the tutorial video I linked. My suggestion to you is to follow along and create the application with the tutorial. Doing so will teach you 95% of what you need. Then use what you have learned to create your app. Once you have most of it working, it will be feasible for people here to help you with the last 5% Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 24, 2020 Author Share Posted May 24, 2020 So let's say if i follow this video then very first step it suggests to make a database like below:- " Make Database For make any web based application, first we need to make table in Mysql database. For this we have to run following sql script. It will make task_list table in your local mysql database." CREATE TABLE `task_list` ( `task_list_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `task_details` text NOT NULL, `task_status` enum('no','yes') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; so after copying this sql command in notepad file where should i save it and how should i exectute that select * from task_list to fetch the data for above table and where should i execute it so far i could not see that phpMyAdmin where is it? please have a glance on the screen shot of my 'Xampp installation location folders' Quote Link to comment Share on other sites More sharing options...
Barand Posted May 24, 2020 Share Posted May 24, 2020 Have you tried looking in the phpMyAdmin folder in that list? Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 24, 2020 Author Share Posted May 24, 2020 yes i can see this older but how can i execute my sql query in this folder but just saving that sql query in notepad file under this folder ,how it will help me to run that sql query? Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 24, 2020 Author Share Posted May 24, 2020 older*-folder* Quote Link to comment Share on other sites More sharing options...
Barand Posted May 24, 2020 Share Posted May 24, 2020 I don't use phpMyAdmin, but have you tried http://localhost/phpmyadmin in your browser? Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 24, 2020 Author Share Posted May 24, 2020 upon executing above mentioned link l got attached error:- Quote Link to comment Share on other sites More sharing options...
gizmola Posted May 25, 2020 Share Posted May 25, 2020 This SO thread covers a lot of the probable issues with getting phpMyAdmin running and accessing it including: Did you start the MySQL server? Did you configure phpMyAdmin to access the MySQL server? What url should phpmyadmin be at? Quote Link to comment Share on other sites More sharing options...
bintech21 Posted May 27, 2020 Author Share Posted May 27, 2020 i tried o start my sql from control panel in XAMPP and then selected data base as MY SQL ( How ever I am not sure whether it's right or wrong) and then tried to execute SQL query shown in you tube link as ' CREATE TABLE `task_list` ( `task_list_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `task_details` text NOT NULL, `task_status` enum('no','yes') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;' But I clicked on go buttom then i saw this meesage ' MySQL returned an empty result set (i.e. zero rows). (Query took 2.2344 seconds.' What does this mean,does it mean table created successfully? Quote Link to comment Share on other sites More sharing options...
Barand Posted May 27, 2020 Share Posted May 27, 2020 Is there now a table in your database called "task_list" with those columns defined? If there is, you may assume it worked. If not, it didn't. 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.