Hi i am trying to fetch data from database into my dropdown menu in codeigniter, but havind error of 'undefined variable: unit_name' . this is my model file `public function get_unit_value() { $result = $this ->db ->select('id, unit_name') -> get('units') -> result_array(); $unit_name = array(); foreach($result as $r) { $unit_name[$r['id']] = $r['unit_name']; } $unit_name[''] = 'Select unit...'; return $unit_name; }` this is my controller `public function unit(){ $this->load->database(); $this->load->model('client_model'); $data['unit_name'] = $this ->client_model-> get_unit_value(); $this -> load -> view('add_quote', $data); }` this s my view file `<div class="panel panel-default"> <div class="panel-heading">The form</div> <div class="panel-body"> <!--dropdown input--> <?php echo form_dropdown('unit_name',$data['unit_name'], '', …

Member Avatar
Member Avatar
+0 forum 1

Hello i am getting an error on a CASE WHEN THEN syntax on my mySql SELECT DISTINCT u.uid,c.c_id,u.name,u.profile_pic,u.username,u.email,c.time FROM conversation c, users u, conversation_reply r CASE WHEN c.user_one = '99' THEN c.user_two = u.uid WHEN c.user_two = '99' THEN c.user_one= u.uid END AND ( c.user_one ='99' OR c.user_two ='99' ) AND u.status='1' AND c.c_id=r.c_id_fk AND u.uid<>'1'ORDER BY c.time DESC LIMIT 15 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASE WHEN c.user_one = '99' THEN c.user_two = u.uid WHEN c.user_t' at …

Member Avatar
Member Avatar
+0 forum 5

Hi, I have a working account generator, which passes the password to mysql with MD5. I am currently working on a forgot password script, which generates a new password and stores as md5, then emails the user, however, the new password is not recognised. This is the forgot script. Can anybody see where the issue lies? If required i can post the login execution script [code] <?php session_start(); // Start Session session_register("session"); include 'connect.php'; // This is displayed if all the fields are not filled in $empty_fields_message = "<p>Please go back and complete all the fields in the form.</p>Click <a …

Member Avatar
Member Avatar
+1 forum 7

Dear , We have an billing script when we enter value on the submition page it will create an recipt number and other details we have entered in the form on the page recipt.php that was the first code. Past year the script was working fine but now it was showing us an error in the concole of our browser "** Uncaught SyntaxError: Unexpected token ;**" We don't know what to do or how to resolve this isse in the recipt.php page was are pushing customer mobile number and an message to **tsms.php** we have included our both codes below …

Member Avatar
Member Avatar
+0 forum 3

I have a sp in mssql which gives multiple resultsets.I need to display the result in html table using php . I am using mssql_fetch_assoc() & mssql_next_result(). How to store each resultset in a array and retrieve it. $result=student_sp('1231','1') do curlybrace while($row=mssql_fetch_assoc($result)) brace $name=$row[name]; $age=$row[age]; $marks=$row[marks]; $term=$row[terms]; $Subject=$row[sub]; $html="<table><tr><td>$name</td></tr><tr><td>$age</td></tr></table>" $mark="<table><tr><td>$subject</td></tr><tr><td>$marks</td></tr></table brace bracewhile(mssql_next_result($result)); echo $html; echo $mark I need to display the name & age below name & age the marks for each terms should be displayed. The issue is SP will return 2 resultset 1st resultset : name & age(1 row) 2nd resultset: subject,marks and terms(Multiple rows); Now for the …

Member Avatar
Member Avatar
+0 forum 2

hi it is me again, this is my assignemet been trying to fix this php script for a long time first to begin, it was issuing an error, Warning: join(): Invalid arguments passed in C this is the first error and the second error was: notice: undefined index in c. apprently if my html code, i had register a the values when registering but in my php code i had enter instead, so i fix it right now after i finished fixing it, i tried to register a user and now i am getting a blank page, dont know what …

Member Avatar
Member Avatar
+0 forum 4

this assignmet call for inserting data into the database and also retrieve. at one time it was inserting into the database but for strange reason it just stop inserting, i have search every noook and cranny within the code to find the error. I know that there is an error there that cause it to stop inserting. but what it is I really dont know. I am almost to the point of pulling out my hair. and another thing error is that I have set it to redirect it to the login page(this is the registration page am talking about) …

Member Avatar
Member Avatar
+0 forum 2

I have predefined value like shipping_weight = 10$, my form consisting two dropdown list, if the dropdown selected based on the selection how to return my ajax value, Index.php : <tr> <th>I have : </th> <td> <select id="old" name="i_have"> <option value = "select_option">Select Option</option> <option value = "three_compact">3 Compact</option> <option value = "three_regular">3 Regular</option> <option value = "three_triple">3 Triple</option> <option value = "five_compact">5 Compact</option> <option value = "five_regular">5 Regular</option> <option value = "five_triple">5 Triple</option> <option value = "seven_compact">7 Compact</option> <option value = "seven_regular">7 Regular</option> <option value = "seven_triple">7 Triple</option> <option value = "nine_compact">9 Compact</option> <option value = "nine_regular">9 Regular</option> <option …

Member Avatar
+0 forum 0

I have dynamic page which is loading and preview page from database retrieved values. I did this with successfully. I want to remove parameters from page url. Note that I only used one parameter in url. My url is something like this. (with parameters) http://ads/ad?this=daihatsu-boon-m700s-new-design-2016-nugegoda-2019-04-05-22-49-04 I tried to remove parameters from url, (it success) then my url look like this, http://ads/ad/daihatsu-boon-m700s-new-design-2016-nugegoda-2019-04-05-22-49-04 To do that I added following codes to htaccess file, RewriteEngine On #RewriteCond %{SERVER_PORT} 80 ReWriteRule ^ad/([a-zA-Z0-9-/]+)$ ad.php?url=$1 ReWriteRule ^ad/([a-zA-Z0-9-/]+)/ ad.php?url=$1 Options +FollowSymLinks -MultiViews # Turn mod_rewrite on #RewriteEngine On RewriteBase / # To externally redirect /dir/foo.php to /dir/foo …

Member Avatar
+0 forum 0

I have a search form, and I want to change the url from: https://www.example.com/search?search=term+term to: https://www.example.com/search/term+term I know how to use htaccess, but I don't know how to send user to friendly URL after he submit the form. Here is my form: <form action="search" method="get"> <input type="text" name="search" id="Searchx" placeholder="Search Marketplace" /> </form>

Member Avatar
Member Avatar
+0 forum 2

Hello i have this form and my php code skills not very good if someone make change password I would be glad thank you <div class="col-lg-9"> <div class="nk-box-3 bg-dark-1"> <form class="change-password" method="post" action=""> <input type="password" class="form-control input-change-password" name="opass" id="opass" placeholder="Old Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="npass" id="npass" placeholder="New Password"> <div class="nk-gap-1"></div> <input type="password" class="form-control input-change-password" name="cnpass" id="cnpass" placeholder="Repeat New Password"> <div class="nk-gap-1"></div> <button type="Update" class="nk-btn link-effect-4 ready"><span class="link-effect-inner"><span class="link-effect-l"><span>Change password</span></span><span class="link-effect-r"><span>Change password</span></span><span class="link-effect-shade"><span>Change password</span></span></span></button> </form> </div> </div>

Member Avatar
Member Avatar
+0 forum 12

I am new in Codeigniter And I have no knowldge about Anything in it. This is my Code Snippent Error . A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$theme Filename: core/MY_Controller.php Line Number: 117 Backtrace: File: D:\xampp\htdocs\rms\application\core\MY_Controller.php Line: 117 Function: _error_handler File: D:\xampp\htdocs\rms\application\core\MY_Controller.php Line: 72 Function: _setup File: D:\xampp\htdocs\rms\index.php Line: 337 Function: require_once

Member Avatar
Member Avatar
+0 forum 4

I am required to change ip adress everytime this function gets executed I am trying this code below .But I am completly confused.How can I do this function getData($domainName, $ext) { $proxy = array( 1 => array( '88.255.101.247', '8080' ), 2 => array( '176.53.2.122', '8080' ), 3 => array( '37.123.96.237', '8080' ) ); shuffle($proxy); $servers = array( "biz" => "whois.neulevel.biz", "com" => "whois.internic.net", "us" => "whois.nic.us", "info" => "whois.nic.info", "name" => "whois.nic.name", "net" => "whois.internic.net", "tv" => "whois.nic.tv", "ru" => "whois.ripn.net", "org" => "whois.pir.org", "com.tr" => "whois.nic.tr", "gen.tr" => "whois.nic.tr", "web.tr" => "whois.nic.tr", "k12.tr" => "whois.nic.tr", "org.tr" => "whois.nic.tr" ); …

Member Avatar
Member Avatar
+0 forum 1

I know that the code to send an email to multiple addresses is: $to = "ADDRESS1, ADDRESS2 \r\n"; $headers .= "CC: ADDRESS3 \r\n"; $headers .= "BCC: ADDRESS4 \r\n"; And I know that you can add a reply-to address with: $headers .= "Reply-To: ADDRESS5, ADDRESS6 \r\n"; My question is...what code to use for the reply-to fields so that you can add a CC and BCC. I've tried: $headers .= "Reply-To: ADDRESS5 \r\n"; $headers .= "Reply-CC: ADDRESS6\r\n"; $headers .= "Reply-BCC: ADDRESS7\r\n"; And I've tried: $headers .= "Reply-To: ADDRESS5 \r\n"; $headers .= "CC: ADDRESS6\r\n"; $headers .= "BCC: ADDRESS7\r\n"; Nothing's worked so far. Any …

Member Avatar
Member Avatar
+0 forum 4

I have been working for hours to get this works the problem is that when I first execute this code everything is ok but second time nothing displays. Then I realized that if I wait 20-25 seconds gets executed again I am using this way whois("google","web.tr") I dont get any problem the other extensions(com,net) so on function whois($domainName, $ext) { $servers = array( "biz" => "whois.neulevel.biz", "com" => "whois.internic.net", "com.tr" => "whois.nic.tr", "gen.tr" => "whois.nic.tr", "web.tr" => "whois.nic.tr", "k12.tr" => "whois.nic.tr", "org.tr" => "whois.nic.tr" ); $serverName = trim($servers[$ext]); $tamAd=$domainName.".".$ext; $whois = array(); $output = ""; if (function_exists('curl_version')) { $curl = …

Member Avatar
+0 forum 0

I am trying to validate my registration form but my php codes blocking it some how, I keep this error, Notice: undefined index: in gender c and for the life of me cant seem to find the correct way to fix it nothing I tried is working. and also I have been trying to insert data in the database and it is not inserting at all, I knew there is an error somewhere within the codes and I cant find. can someone plzzzzzzzzzzz help me fix this. here is both the php scripts and the html to go with it …

Member Avatar
+0 forum 0

Hi all, this is my first post and would appreciate some insight as to where im going wrong. I have the following form that successfully registers a new user to my mysqsl database via PHP - with the following $sql INSERT Function The problem im having is sending the activation \ confirmation email to the new users email address. [code] //email function ini_set("SMTP", "smtp.server.com");//confirm smtp $to=$email; // Your subject $subject="activation required"; // From $header="from: test email <Test@test.com>"; // Your message $message="Your Comfirmation link\r\n"; $message.="Click on this link to activate your account\r\n"; $message.="You can not login to your new account until …

Member Avatar
Member Avatar
+0 forum 7

Hi, I'm new to php (Yii Framework) and SQL (phpMyAdmin). I have problem to ask. ![Capture11.PNG](/attachments/large/4/1e4d9bf0c9a482a977d0ccb0fa19260e.PNG) Currently the three dropdown menu from different table and each have different id called aircraft_type, aircraft_sn and aircraft_reg. I want to use only one table called aircraft. In this table have all three details and only have one id. What I want to do is, when user choose value from aircraft type, the aircraft serial number and aircraft registration will also automatically fill. Calling value from table aircraft only. So far the code I have is: 1)_form.php (project form) <div class="panel panel-bordered panel-success"> <!-- …

Member Avatar
+0 forum 0

Hi all I am very new to using php, I have a class project which I have to create a dynamic php page with a drop down selection menu. I have already created the pages for my project but when I choose the form I want and hit submit it doesnt redirected to the selection chosen. This is the form and php code i have been working on. Thank you <html> <title>Main Menu Page</title> <body> <h1>Main Menu Page</h1> <h2>Please Select one</h2> <form action="#" method="GET"> <select name="Choose"> <option value="select one">Select One</option> <option value="General Feedback">General Feedback</option> <option value="Help Request">Help Request</option> </select> <input …

Member Avatar
+0 forum 0

I need to create a database from the messages, coming from the Mobirise website builder's forms. What code should I use? This doesn't work. Could you please help me. $link = mysqli_connect('localhost', 'root', 'password'); if (!$link) { $output = 'Unable to connect to the database server.'; include 'output.html.php'; exit(); }

Member Avatar
+0 forum 0

i really need help, am new in programming and youtube is my teacher. i really need assistance to install Cryptomarket Trading System Installer in to my cpanel.

Member Avatar
Member Avatar
+0 forum 1

I have to take over a php project and I am totally new to php. I have this webpage that displays all packages sent to a customer and I want them to be able to click on the tracking number to do UPS website tracking. The code: <?php $result = mysqli_query($conn, $sql); if (!$result) { exit(); } else { if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { echo "<tr>"; echo "<td><strong>"; echo $row['trackingno']; echo "</td>"; echo "<td>"; echo $row['date_shipped']; echo "</td>"; echo "<td>"; echo $row['desc_reference2']; echo "</td>"; echo "<td>"; echo $row['status']; echo "</td>"; echo "<td>"; echo $row['date_delivered']; echo …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone , I have find i script made in 2013 that use Mysql , Today the mysql has removed and remplaced by Mysqli or PDO Can any one help me please to convert the mysql code to mysqli Exemple : <?php $num_queries = 0; $total_time = 0; class ADO { function ADO($host,$user,$password,$database) { $this->connection=mysql_connect($host,$user,$password); if(!$this->connection) { echo "<br>Database Error!!!<br>".mysql_error(); } mysql_select_db($database); } function exec($sql) { // echo "<br />".$sql; //exit; // global $num_queries; // global $total_time; // $num_queries++; // $start_time = microtime(true); // echo "<br />".$num_queries." ".$sql; $result=mysql_query($sql,$this->connection) ; if(!$result) echo "<p>ERROR::".mysql_error()."<br><strong>".$sql."</strong></p>"; // $time_taken = round(microtime(true) - $start_time, 4 …

Member Avatar
Member Avatar
+0 forum 1

Hello i have a problem with a Sql script `SELECT col1_id, col1_name, col2 FROM table GROUP BY ?????` col1_id col1_name col2 A john bear A john dog A john cat A john bear A john dog A john cat A john dog A john cat A john bear A john dog A john cat A john bear A john dog A john cat A john dog A john cat I want to return all results. It has to return like this: ` echo col1_id . col1_name` (A john) and then `col2` (bear,dog, cat)

Member Avatar
Member Avatar
+0 forum 4

I am required to pass a parametre to jquery post and then get it using $_POST method .But it doesnt work this way.I cant display on the page <!doctype html> <html lang="en"> <head> <title>Document</title> <script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30=" crossorigin="anonymous"></script> </head> <body> <?php @$a = isset($_POST["isim"]) ? "var" : "yok"; echo $a; ?> <button type="button" id="tikla">Tıkla</button> </body> </html> <script> $(document).ready(function(){ $('#tikla').click(function () { $.post( "xx.php", {"isim": "tayfun"}) .done(function(data){ }); }) }) </script>

Member Avatar
+0 forum 0

Hi there, recently I have created stored procedure in **Postgres Sql** which deals about with hashing passwords. When used via **pgAdmin** tool it works like a charm as stated below. SELECT horeca_user.update_token( 1, //user_id 1, //type 'sdsfsdfs' //token ) I have also installed extension **pgcrypto**. It works when called via **pgadmin** tool, but not inside **laravel** app as stated below my php code. $token=\DB::select("SELECT * from \"horeca_user\".update_token('$type', '$user_id', '$token')"); and finally this is my procedure code. CREATE OR REPLACE FUNCTION horeca_user.update_token(tp integer,userid integer,token character varying) RETURNS character varying LANGUAGE 'plpgsql' VOLATILE PARALLEL UNSAFE COST 100 AS $BODY$ DECLARE uid INTEGER; …

Member Avatar
+0 forum 0

<table> <?php if(count($members)) $j=1; foreach($members as $key => $member) <tr> <td><label><?php echo $j.". "."  ".$member->member_id."  ".$member->name;?></label></td> <td><input type="radio" id="attendance_<?php echo $key?>" name="attendance[<?php echo $key?>]" value="present" required >Present <input type="radio" id="attendance_<?php echo $key?>" name="attendance[<?php echo $key?>]" value="absent" required >Absent</label></td> <td><select name="reason" id="reason" required style="display:none"> <option value="Work">Work</option> <option value="India">India</option> <option value="Sick">Sick</option> <option value="Personal/Family Issues">Personal/Family Issues</option> <option value="Overseas">Overseas</option> <option value="No reason/No response">No reason/No response</option> </select></td> <td><input type="text" name="remarks1" id="remarks1" placeholder="Remarks." required style="display:none"></td> </tr> <?php $j++; </table>

Member Avatar
Member Avatar
-1 forum 1

I'm recently trying to upload images without page refreshing. To do that I had identify ajax. My server side programing language is php. So I tried and success with it, but it's refreshing page. So I change that code after do research. But it shows error. Please help me with this. **This is my html form and it's file name is *index.php*** <form method="post" enctype="multipart/form-data" id="formUploadFile"> <label>Select single file to upload:</label> <input type="file" name="files[]" multiple="multiple" /> <input type="submit" value="Upload File" name="btnSubmit"/> </form> **In the same *index.php* page I opened `<script></script>` tag and put following code.** <script> $(document).ready(function (e) { $('#formUploadFile').on('submit', …

Member Avatar
Member Avatar
+0 forum 1

php-pdf attachment is in wrong format on webmails

Member Avatar
Member Avatar
+0 forum 1

in my assignment I trying to create a popup box but someting wrong with my code. it supposed to popup when called and close as it have a close button but the button is not working can something tell me what did i do wrong. here is my code: is there somethings that some else can i and I cant <?php /*session_start(); if(!isset($_SESSION['view'])) { header("location:../xhtml/login.html"); }*/ ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> Caribbean Nature Seekers Institute Trinidad and Tobago Chapter</title> <link rel="stylesheet" type="text/css" href="../css/stylesheet.css" /> </head> <body> <div id="container"> <div id="header"> <div id="banner"> <img src="../images/header.jpg" alt="header" /> </div> </div> …

Member Avatar
Member Avatar
+0 forum 1

The End.