• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Value Not Matching

#1
Hello

I seem to be having a problem which I just cannot understand.

I have 1 text input I am using to get an ID for an Event. For some reason which I just cannot understand, the value is not matching.

Code:
<form action="searchevent" method="post">
    <div class="row" style="margin-top: 20px;">
        <div class="col-md-2">
            <label style="font-size: 20px;">Event ID: </label>
        </div>
        <div class="col-md-6">
            <input type="text" class="form-control" name="eventid" placeholder="Enter the ID for the Event">
        </div>
        <input type="submit" name="getevent" value="Search">
    </div>
</form>
 Above is the simple form I have to get the ID

And below is the function which checks the value

Code:
public function searchevent() {
    $data = array();
    $eventid = $this->input->post('eventid');
    $dbname = $this->session->userdata("dbname");
    $this->db->db_select($dbname);

    $events = $this->callAPI('eventlist');

    foreach ($events['Records']['Record'] as $record) {
        if ($record['EventID'] == $eventid) {
        $fields = array(
                'displayname' => array(
                'type' => 'VARCHAR',
                'constraint' => 255,
                 'null' => FALSE
            ),
            ..... cut off for brevity
For some reason which I just cannot understand the $record['EventID'] does not match the $eventid!?  I have no clue why. This SHOULD match. I KNOW the EventID does exist in a record, I have seen it in the records. the ID is 4683. Even if I put "4683" instead of $eventid, there is no match. I have been sitting for over an hour trying to figure out why this is not matching even with the hard coded value instead of $eventid. And as I said I know the ID exists I can see it in the records.

I would be very gratefull if anyone have any ideas as to why this happening?
Reply


Messages In This Thread
Post Value Not Matching - by GregS - 02-20-2020, 02:31 PM
RE: Post Value Not Matching - by InsiteFX - 02-20-2020, 04:50 PM
RE: Post Value Not Matching - by GregS - 02-20-2020, 05:57 PM
RE: Post Value Not Matching - by dave friend - 02-21-2020, 02:32 PM
RE: Post Value Not Matching - by GregS - 02-22-2020, 12:30 AM
RE: Post Value Not Matching - by dave friend - 02-22-2020, 01:14 AM
RE: Post Value Not Matching - by InsiteFX - 02-22-2020, 06:07 AM
RE: Post Value Not Matching - by GregS - 02-27-2020, 01:59 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.