39,393 Topics
![]() | |
I have a helper function in codeigniter php where I can use helper like so load_controller('column_left', 'index'); for example "column_left" is the file and class name. How ever that works fine but I would like to be able to type a folder name in load_controller('some_folder/some_class', 'index'); and it would detect … | |
Here's dish. When I submit a form, it straight up crashes my site on my network. Here are the details. 1. The form submits to itself. The form is on site.php (fictional name for reference on this post) and the action= "site.php". 2. When it crashes, it crashes for every … | |
I need help parsing json data to a specific format so I can put it on a line chart. More specifically a line graph using [highcharts](http://www.highcharts.com/demo/line-basic) This data comes from a query $data['graph']=$this->mymodal->graphmodal($id); foreach ($data['graph'] as $row) { //modify array.. } echo json_encode($data['graph']); The result this produces is the following … | |
I have the following $subUsername = trim($_POST["user"]); $sql = "SELECT userID, username, password FROM user WHERE username = ':user')"; $q = $conn->prepare($sql); $q->bindParam(':user', $subUsername); $q->execute(); $result = $q->fetch(PDO::FETCHASSOC); print_r($result); echo "</p>"; print_r($subUsername); echo "</p>"; print_r($subPassword); However `$result` is always just an empty array, if I run the SQL on the … | |
I have this code for checking the username and ticket availability but something doesnt work well if someone can tell me whats the problem, this error shows me if i enter the right info `Invalid Ticket or Receiver` here is the code: <?php if(isset($_POST['sendTicket'])) { $ticketID = $_POST['ticketID']; $ticketReceiver = … | |
Hello, This is my case: - In file abc.php, I have mentionned two other file as two tabs (tab1.php and tab2.php). Their links are: abc.php#tab1 and abc.php#tab2 - On tab2.php, I have a form: <form action="" method="POST"> <select name="slot" id="slot"> <option value="1"> <option value="2"> <option value="3"> </select> <input type="submit" value="Update" … | |
Morning guys hope that you are all well. need to pick your brains because I'm ready to bang my head against a brick wall. I'm building a multipolchoice quiz I want to just show 20 random questions from the 80 questions that I have in the question bank, in my … | |
Hi, I need to create a image editing tool in php. I'm begginer to the php. I tried it in 'javascript' but I need it to create it in php. my javascript code also didn't work(crop box is didn't work properly even it didn't move). I have no idea to … | |
Me again... So now I am confused... I have a form: <form action="addanimal_submit.php" method="post" enctype="multipart/form-data" style="padding-left:10px"> <p>Name: <input type="text" name="name"></p> <p>Date of Birth: <input type="text" name="dateofbirth"></p> <p>Description: <input type="text" name="description"></p> <p>Available For Adoption? <select type="text" name="available"> <option value="1" selected>Yes</option> <option value="0">No</option> </select> </p> <p>Image Of Animal:</p> <p><input type="file" name="fileToUpload"></p> <input … | |
So I currently have a listbox which dynamically generates its members from the database. It has name and id set to "availablePets". When one of the items in the list is clicked I want to populate some other fields on the screen by quering the database for the rest of … | |
QUIZ (Due to the beginning of next class) Create a website that asks a simple question and retrieves the viewer’s answer. Display messages on the screen depending on the answer: • If the answer is correct, display “Congratulations!”. • Otherwise, display a message like “Your answer was ---------. The correct … | |
One of my websites recently had problems with the PHP news parser. For many years, it worked fine. However, a while back it started acting up. See the attached image of a screenshot. And since the PHP parser was the first block of code on the page, since it didn't … | |
how to split numbers in php?i need a PHP code for this input.if the input is 143,i need output as **8**(tat is sum of 143{1+4+3}) | |
I need to process a CSV file and create a new CSV file. In order to get a proof of concept, I placed the CSV on the server and was able to process it fine. Then I setup a form in order to allow the client to upload the file. … | |
I am trying to pass a value from a hidden input using ajax but console says whatever im doing is not a function `Uncaught TypeError: "#name".val is not a function page.php:35` which is this line : `var name = ("#name").val();` html: <input type='hidden' value='$newname' id='name'> ajax: var name = ("#name").val(); … | |
I am having no luck with this code but for some reason i can get this element to work but not the other one. here is my code. <td><a onclick="javascript:approve_account_function(<?php echo $row['id'];?>, <?php echo $rownumber;?>)" class="btn btn-success" name="yes_account" id="yes_account">Approve</a></td> <td><a onclick="javascript:decline_account_function(<?php echo $row['id'];?>, <?php echo $rownumber;?>)" class="btn btn-danger" name="no_account" id="no_account">Decline</a></td> … | |
Hi. Im trying to update a page with a form using AJAX but it isn't working. Nothing happens. I have a table and one of the columns has an anchor tag like this`<td><a href='#' value='$name' class='request' onclick='request(".$name.")'>$status</a></td>` so when the user clicks on Request a form opens up via ajax. … | |
I'm beginner to wordpress I'm writing Business Directory Plugin for test from scratch. I have category page with database. how to add image support for categories? I got error while uploading images. *"File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled … | |
Hi All I am new to trying to create my own mod_rewrite rules but do know from the outset my server host supports it. I have one pre-built script which uses them without issue which means it is me :-( So, my goal is to make: http://www.kentroadplanings.co.uk/index.php?show_pages=4&p=Screened-Road-Planings into: http://www.kentroadplanings.co.uk/Screened-Road-Planings.html So, … | |
Hello everyone, it seems that most often many projects or let me say jobs requires PHP frameworks. But I have not used a framework before and I love coding in the actual php OOP syntax. Is it necessary to use a framework for a project? ![]() | |
while executing the below program i am getting the error "Parse error: syntax error, unexpected '<<' (T_SL) in C:\xampp\htdocs\registration.php on line 5" . can i get some help ?? <?php extract($_POST); include "connection.php"; $link= md5($txtuname); $str= <<<abc account is created click on the activation link <a href="http://abc.com/active.php?$link">click </a> abc; if(mysql_query("insert … | |
I am trying to code a search box that will search though a column in my database. If the search matches the column then that record will be printed in the table below. I am searching on a column that contains the county of a company record. There are no … | |
Hello everyone. I am trying to make a simple to-do list program using PHP and the MVC pattern. I have managed to make the login page, the model and the controller for managing logins. It is working properly because it can discern if the user exists or not. After validating … | |
I have two modules built by two developers: 1) backoffice 2) reporting However they share a single connection. The problem now is the security aspect. Both modules are independent in their respective folder(s) but they share the same connection. A developer mention that with the current architecture it is impossible … | |
HOW CAN I STYLE THE ANCHOR TAG IN ECHO? if(isset($_SESSION['valid'])) { include("config.php"); $result = mysqli_query($conn, "select * from users"); echo "<a href='view.php'>View and Manage Users</a>"; echo "<br/>"; echo "<a href='viewdept.php'>View and Manage Departments</a>"; echo "<br/>"; echo "<a href='viewrep.php'>View and Manage Reports</a>"; echo "<br/><br/>"; echo "<b>Login List:</b><br/>"; echo "<table width='35%'>"; echo … | |
I am inserting a record via Campaign Monitor API; as I am passing below array; why I am getting error: Array( [EmailAddress] => tljljljl@example.com [Name] => Trial test [CustomFields] => Array ( [0] => Array ( [Key] => First name [Value] => trial ) [1] => Array ( [Key] => … | |
Im having problems getting this to work.. What I need to do is scan a directory, and search for all images that belong to the member. Here's the basic process: 1. A member uploads a photo 2. If accepted, the photo is automatically renamed by appending the member's name as … ![]() | |
Hi, In a form, I have 4 select boxes(default), and two text boxes(default). If I click the first (static values) based on that next second(new) select box will come (it has been done by ajax), based on the new select box, I display checkboxes based on the select box values, … | |
$username = $_POST['username']; $password = $_POST['pass']; $query = "SELECT id,name,username,password,status FROM users WHERE username = " . $dbh->quote($username); $result = $dbh->query($query); $userData = $result->fetch(PDO::FETCH_ASSOC); $userName = $userData['username']; $hash = $userData['password']; $status = $userData['status']; if($username == $userName) { if(password_verify($password, $hash)) { if($status == 'Request') { echo "<script>alert(\"You have not been activated. … ![]() | |
I want to pass array value directly into the js fucntion which in loop and wanted to retrieve its query string id of selected employee here is code as i said in loop i wanted to pass array value while($row = mysql_fetch_array($res)){ echo "<tr>". "<td> <p><button onclick=func({$row[0]}) >View</button></p> </td>" ."</tr>"; … |
The End.