hey,, har denne kode:
<cfparam name="form.submit" default="">
<cfif findnocase('rearrange', form.submit)>
<cfloop index="loopitem" from="1" to="#form.thecount#" step="1">
<cfquery name=changesequence datasource="#db#">
update content
set contentseq = #loopitem#
where contentid = #listgetat(theresults, loopitem)#
</cfquery>
</cfloop>
<cfinclude template="This file displays the sequence">
<cfelse>
<cfinclude template="This file displays the sequence">
</cfif>
nogen der kender sproget, og kan oversætte den til PHP ?
Koden skulle gemme data sendt fra denne form:
<form name="theForm" action="change.php" method="post" onSubmit="showMenu(document.theForm.theMenu)">
<input type="hidden" name="theCount" value="<?php echo $reorder_topmenu_count; ?>">
<input type="hidden" name="theResults" value="">
<select name="theMenu" size="<?php echo $reorder_topmenu_count; ?>">
<?php while($reorder_topmenu = mysql_fetch_array($reorder_topmenu_result)) { ?>
<option value="<?php echo $reorder_topmenu["id"]; ?>"><?php echo $reorder_topmenu["name"]; ?></option>
<?php } ?>
</select>
<p>
<input type="button" name="up" id="submit" value="OP" onClick="javascript:move(document.theForm.theMenu,'up')">
<input type="button" name="up" id="submit" value="NED" onClick="javascript:move(document.theForm.theMenu,'down')">
</p>
<p>
<input type="submit" id="submit" name="submit" value="Gem">
</p>
</form>
Ellers er der nogen der kan komme med et bud på hvordan jeg gemmer data fra formen, i en mysql database, skrevet med PHP ?
Indlæg senest redigeret d. 25.03.2010 22:40 af Bruger #10114