dmcg Posted April 20, 2007 Share Posted April 20, 2007 i'm trying to build a cms. I'm needing some advice on submitting. have two senerios 1. embedded self referencing URL s 2. menu editor update 1. embeded self refrencing URLs within the content its self such as <a href="index.php?content=generic&action=viewlist&category=4" >category four, listing</a><br> <a href="index.php?content=generic&action=view&item=43" >some other content</a> 2. Menu editor updating when i set the url of the menu item to 'index.php?content=generic&action=viewlist&category=4' then when i go to submit it, errors out. Because the query keys are repeated within the query string. How can i handle this, with out changing my query keys? <form id="adminform" action="index.php" method="post" > <input type="hidden" id="itemid" value="{contentid}" /> <table style="text-align: left; width: 65%;" border="01" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;text-align: right;">Section :</td> <td style="vertical-align: top;">{sectionid}</td> </tr> <tr> <td style="vertical-align: top;text-align: right;">Category :</td> <td style="vertical-align: top;">{categoryid}</td> </tr> <tr> <td style="vertical-align: top;text-align: right;">Title:</td> <td style="vertical-align: top;">{title}</td> </tr> <tr> <td style="vertical-align: top;text-align: right;">body:</td> <td style="vertical-align: top;">{body}</td> </tr> </tbody> </table> </form> <script language="JavaScript"> function submitbutton(pressedbutton) { /*var form = document.editform;*/ if (pressedbutton == 'cancel') { window.location = 'index.php?content=frontpage&action=view'; return; } s = 'index.php?content=genericcontent&action=' + pressedbutton + '&itemid=' + document.getElementById('itemid').value + '§ionid=' + document.getElementById('sectionid').value + '&categoryid=' + document.getElementById('categoryid').value + '&title=' + document.getElementById('title').value + '&body=' + document.getElementById('body').value; window.location = s; } </script> Link to comment https://forums.phpfreaks.com/topic/47852-needing-some-advice-on-submitting/ Share on other sites More sharing options...
taith Posted April 20, 2007 Share Posted April 20, 2007 just as a subnote here... transfering data through $_GET is VERY unsecure... using textboxes/areas and $_POST is 100X more secure... Link to comment https://forums.phpfreaks.com/topic/47852-needing-some-advice-on-submitting/#findComment-233864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.