Hi, π
I'm using the submitcontent form, which is really greatπ
but I need to have each article writer to select a category as in the classical "submit an article" page from the Joomla Core. I tried many things (pasting the code from the "submit an article" page to my form, etc.), but none works.
I'm a beginner in PHP, but I tried to code myself. Maybe I took a wrong way right from the start, or maybe I've done a huge and obvious error. Anyway I think that won't be hard for you to find out!!!π
So far I have something like this in the "Form HTML" part :
Thanks a lot for helping me π
I'm using the submitcontent form, which is really greatπ
but I need to have each article writer to select a category as in the classical "submit an article" page from the Joomla Core. I tried many things (pasting the code from the "submit an article" page to my form, etc.), but none works.
I'm a beginner in PHP, but I tried to code myself. Maybe I took a wrong way right from the start, or maybe I've done a huge and obvious error. Anyway I think that won't be hard for you to find out!!!π
So far I have something like this in the "Form HTML" part :
Choose a category : <div class="clear">
<form action="" method="post" name="category" id="category">
<label></label>
<select name="category" id="category">
<option>category1</option>
<option>category2</option>
<option>category3</option>
</select>
</form>
</div>
and this in the "On Submit code - after sending email" part : <?php
$category=$_POST['category'];
$goandfind_req= "SELECT id FROM jos_categories WHERE ".$category."= title";
$goandfind=mysql_query($goandfind_req);
$_POST['catid'] = $goandfind;
$_POST['id'] = ' ';
$_POST['sectionid'] = '1';
$_POST['state'] = '0';
$_POST['created'] = date("Y-m-d H:i:s");
?>
Thanks a lot for helping me π