CodeIgniter concealing data in form is not being transmitted

Attempting to submit data through a form with a hidden field:

$data_acc=array('db_id'=>$id,
'db_lastname'=>$lastname,
'db_name'=>$name,
'db_phone'=>$phone,
'db_city'=>$city,
'db_email'=>$email
);
var_dump($data_acc);
form_hidden($data_acc);

The var dump result shows this information :

array(6) { ["db_id"]=> string(1) "6" 
["db_lastname"]=> string(0) "" 
["db_name"]=> string(0) "" 
["db_phone"]=> string(0) "" 
["db_city"]=> string(0) "" 
["db_email"]=> string(22) "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0a7272724a72727224696567">[email protected]</a>" } 

However, I am unable to access this data from the resulting page function.

Appreciate any assistance.

Answer №1

Don't forget to include the echo before form_hidden() in order to generate the hidden inputs correctly.

echo form_hidden($data_acc);

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Looking for assistance with transferring a JavaScript array to my PHP script

Is there an easier way to transfer a JavaScript array to a PHP file? I've seen examples of using AJAX for this task, but I'm wondering if there's a simpler method. Below is a snippet of the code I'm working with: <html> <hea ...

acquire attribute values with the help of jQuery

Trying to fetch the attribute value from a <div> tag using jQuery. Here's my HTML code, where values of $_GET['availabel_table'] and $_GET['number-of-person'] are taken from the URL: <div id=main_menu_data class="grid_21 ...

Ineffective Implementation of While Loop for Div Visibility

Here's a simple code that generates divs using a while loop. However, it doesn't seem to be working as expected. It's actually just basic HTML, nothing too complex. But for some reason, it's not displaying any of the five divs. <? ...

Mastering the art of organizing fields and labels in a yii2 bootstrap active form for optimal user experience

I'm currently working on the Yii2 Bootstrap active form and I have a requirement to group multiple inputs within one form group. For example: <div class="form-group field-phn required"> <label class="control-label" > ...

Ways to tackle my code's linked dropdown issue without the use of extensions

When I selected the Id Province, I couldn't select the Id City. How can I fix this issue? Controller code snippet to address this: View code snippet for the same: ...

Minimize the strain caused by php cURL on the server

Currently, I am utilizing PHP URLs to access over 500 web pages daily while maintaining cookies. Each page must be verified to ensure that the account remains logged in and the views are recorded as a member rather than a guest. The script takes about an ...

Sending emails with SMTP in JavaScript using the mailto form

I'm facing a challenge with my form. I am looking for a way to have the Send-email button trigger mailto without opening an email client, instead automatically sending via JavaScript (smtp). I'm not sure if this is achievable or if I'm askin ...

Impact of variable names in MySQL stored procedures on deletion operation

Encountering a puzzling issue with a MySQL stored procedure. Here is the procedure: DROP PROCEDURE IF EXISTS `removeSubscription`; DELIMITER ;; CREATE DEFINER=`root`@`%` PROCEDURE `removeSubscription`(IN `userId` int,IN `channelId` int,IN `channelTypeTitl ...

The Impact of CSS Border Width on the Size of a PHP Form

Creating a PHP form with a tabbed box has been quite the challenge. With 3 tabs, each requiring different field inputs, I set out to add a border around the form headings and tabs. The border looks great, but it poses a problem - its width spans the entire ...

Is there a tool available for generating a PHP proxy class specifically for a web service using WSDL?

Hello there, I am looking for a tool to create PHP proxy classes for webservices programmed in .NET. Is there anything available for this purpose? Regards, RK ...

Storing JSON data in an array and using the IDs to dynamically fill in the corresponding types

My function retrieves attribute ids along with their corresponding names in JSON format. Here is an example: { "DETAILS": [ { "ATTR_ID": "522", "ATTRIBUTE_ID": "4222", "ATTRIBUTE_TYPE": "email", }, ...

Tips on saving JSON response data to EditText in Android

Hey there! I am currently trying to retrieve the reg_no array value from the database and display it in an EditText without the need for any button clicks. I would appreciate some guidance on how to achieve this in my class file. String RegNo = Database ...

Reached the maximum number of followers allowed by the Instagram API while using PHP

I am facing an issue with retrieving all the information from my Instagram profile. When I have less than 50 followers, everything displays correctly. However, on my test profile with 7-8 followers, and my real profile with over 200 followers, the maximum ...

Using PHP to create a NULL value in a .JSON file

After encountering a NULL value in my .json file when trying to write an array to it, I am puzzled as to why this issue only arises with the 'array_push' line after creating a new file. Interestingly, if there is already a .json file present with ...

At times, certain HTTP (fetch-XHR) requests tend to get terminated. In my case, I am utilizing Flutter Web (get: ^4.6.6) alongside Xampp (Laravel

https://i.stack.imgur.com/MJUOH.png https://i.stack.imgur.com/fDhJe.png A request sent via Http (fetch-XHR) enters a state of cancellation, but it occasionally functions properly. It appears that the initial attempt after loading the page is usually uns ...

What are the steps to create a website search feature using PHP?

Hey there, I'm completely new to creating something like what I have in mind. I want to add a search function to my photography website which is currently being developed. I've come across a similar search function on this website Here and I real ...

Using Codeigniter to fetch a PHP array in an AJAX success callback

I have implemented a jQuery script to send the value selected from a dropdown menu to my controller. The controller then calls a function in my model to execute a query using this value, and retrieve an array of results from the database. These results are ...

Verify if the relationship is established with the value attribute of CDataColumn

Is it possible to use a conditional statement within the value attribute of CDataColumn to verify if a model has a value set before displaying it? For example, I have a model Source with an optional relation 'country' that is not always set for e ...

Imagick is the magical alternative to the imagemagick command that allows for seamless merging of images while

In Imagick, I am unable to locate any equivalent commands for merging 4 PNG images as layers with transparency. The following ImageMagick command achieves this: convert image1.png image2.png -background transparent image3.png image4.png -layers flatten n ...

Leveraging WordPress as a landing page integrated with a Silverlight backend

Currently, I am a web developer working on a project for a WordPress landing page that will eventually direct users to an all-Silverlight page. However, my programmer is claiming that this cannot be accomplished due to conflicts between PHP and Silverlight ...