Wenn ich auf den Knopf auf Formular drücken in CodeIgniter, wenn ich XController/loadX
bin und meine Aktion ist YController/loadY
, die URL wird wie Xcontroller/loadX/Ycontriller/loadY
, und ich möchte es einfach sein YController/loadY
.Die URL ist nicht, was ich will
<form name="SpecAccept"method="post"action="SpecialistController/loadDoctor">
<div class="form-group col-sm-12" id="myDiv" align="right">
<span><label>الولاية</label></span>
<select style="font-size:12px" class="form-control" id="state_name" onchange="change(this)">
<option>--- اختر الولاية ---</option>
<?php
foreach($states as $Object){
echo '<option value="'.$Object->StateID.'">'.$Object->StateName.'</option>';
}
?>
</select>
</div>
<div class="form-group col-sm-6" id="myDiv" align="right">
<span><label>المهنة</label></span>
<select style="font-size:12px" class="form-control" id="career_name" >
<option>--- اختر المهنة ---</option>
<?php
foreach($careers as $Object){
echo '<option value="'.$Object->CareerID.'">'.$Object->CareerName.'</option>';
}
?>
</select>
</div>
<div class="form-group col-sm-6" id="myDiv" align="right">
<span><label>المستشفى</label></span>
<select style="font-size:12px" class="form-control" id="hospitals" name="Hospitals" >
<option value="0" isSelected>اختر الولاية اولاً</option>
</select>
</div>
<div class="form-group col-sm-12">
<button type="sumbit">عرض</button>
</div>
</form>
was ist das Problem und wie es zu beheben?
eine '/' infront der URL hinzufügen in 'Aktion = "" ' – modsfabio
Wenn ich das gemacht habe, wird es keine Werte an den Controller senden @ modsfabio –
Es scheint, dass Sie ein Problem mit Ihrem Code haben. Wir können jedoch nicht helfen, wenn wir nicht [Code oder Informationen haben, die das Problem reproduzieren können] (// stackoverflow.com/help/mcve). Ansonsten raten wir nur blindlings. – FrankerZ