PHP, jQuery and definitely not my favourite. My query is this; I purchased a social network script and there are still modifications I need to do that I am stuck with. I would like the users to have the option to upload a photo if they want to, with any radio/icon they choose. So at present in the status bar, they can add a description and then must choose a category -which is the radio/icon- then that category will give them a chance to add in a subject. I need help in modifying it so that whichever category they choose they have an option to upload a photo too, so that when they press post, their status has the text, subject/icon and the photo.
This is the explanation from the developer who developed the script: But sadly this PHP newbie (Me), still doesnt get it :) Below his comments I have placed the code. Any help greatly appreciated!
**Developer: This is a bit tricky, but it can be definitely achieved with the proper php skills. Now you have two ways:
1. The current messages table have the following columns
'type', 'value'
Whenever you upload a photo, the type will get the value 'picture', and the 'value' will get the image name, the problem is when you try to combine it with another event, those fields will already be filled up with details from picture, however this can be bypassed. When you send the form, you can combine the input of the user like so:
How it works now: 'type' = 'picture'; 'value' = 'image1.png';
You could try to do something like this:
How you can do it: 'type' = 'picture/food'; 'value' = 'image1.png/Pizza';
and then when the message is being shown, just make a new case "picture/food" and explode the string like explode('/', $string); (/=delimiter) and that's it.
2. Alternatively, you can add two new columns called type2 and value2 where you can store each type separately (I would go with the option 1).
**