39,320 Topics

Member Avatar for
Member Avatar for DavidB

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 …

Member Avatar for DavidB
0
489
Member Avatar for shashigowda

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})

Member Avatar for Gideon_1
-1
262
Member Avatar for Justin_14

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. …

Member Avatar for Gideon_1
0
280
Member Avatar for nadiam

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(); …

Member Avatar for nadiam
0
3K
Member Avatar for berserk

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> …

Member Avatar for bnmng
0
480
Member Avatar for nadiam

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. …

Member Avatar for nadiam
0
378
Member Avatar for hrushi9

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 …

0
122
Member Avatar for wooshman

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, …

Member Avatar for wooshman
0
147
Member Avatar for Gideon_1

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?

Member Avatar for diafol
0
224
Member Avatar for Kamal_6

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 …

Member Avatar for Gideon_1
0
182
Member Avatar for jonlloydd

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 …

Member Avatar for Gideon_1
0
9K
Member Avatar for G_S

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 …

Member Avatar for G_S
0
232
Member Avatar for solomon_13000

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 …

Member Avatar for cereal
0
250
Member Avatar for opelio4n

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 …

Member Avatar for opelio4n
0
198
Member Avatar for abhi10kumar

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] => …

Member Avatar for pritaeas
0
499
Member Avatar for flynismo

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 …

Member Avatar for diafol
0
491
Member Avatar for AntonyRayan

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, …

Member Avatar for Gideon_1
0
3K
Member Avatar for nadiam

$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. …

Member Avatar for diafol
0
282
Member Avatar for King_Of_lords

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>"; …

Member Avatar for Gideon_1
0
597
Member Avatar for ramsiva

I have array Array ( [0] => 1,2,3,4,5 [1] => 1,2 [2] => 1,2 ) how to remove duplicate elements and i want to single array like Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5)

Member Avatar for ramsiva
0
238
Member Avatar for chrisschristou

hello my friends i have posted this article before but it stil didn't work so so i tried many time different way but i dont see the reason why my menu is not working. in my main page `template.php` here is the content <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> …

Member Avatar for pixelsoul
0
2K
Member Avatar for Jc

I'm trying to print out form input using getElementById but it doesn't seem to work. Please help. <?php $strhtml = 'DomDoc.html'; // create the DOMDocument object, and load HTML from a string $dochtml = new DOMDocument(); $dochtml->loadHTML($strhtml); // get the element with id="dv1" $elm = $dochtml->getElementById('name'); // get the tag …

Member Avatar for diafol
0
239
Member Avatar for drag

I have array like this stdClass Object ( [0] => stdClass Object ( [field_id] => 10 [value] => 46426 [value_integer] => 0 ) [1] => stdClass Object ( [field_id] => 9 [value] => 1987 [value_integer] => 0 ) [2] => stdClass Object ( [field_id] => 8 [value] => 558/65 [value_integer] …

Member Avatar for diafol
0
278
Member Avatar for hrushi9

How to create simple photo Album in wordpress **Photo Albums Requirements** `albums.php` to listout Albums `gallery.php` to listout images inside selected album 1. Set Album cover 2. hover effects for album (http://tympanus.net/Development/HoverEffectIdeas/) 3. fields to create Albums 4. fields to upload images

Member Avatar for hrushi9
0
232
Member Avatar for hrushi9

I'm Wordpress beginner. Trying to create plugin "Business Directory Plugin". Need Help to complete code. How to get information about business listing? How to get following information, 1. Business Name 2. Business Category 3. Business Description 4. Business Phone Number 5. Business Address 6. Business Email 7. Business Website, if …

0
120
Member Avatar for UK-1991

Hello Experts, I hate PHP when these things comes in front of me every time when i create and insert query I stuck up by viewing everything is ok but not working don't know why. please help me out previewuser.php <?php include_once('includes/header.php'); include_once('includes/session.php'); include_once('includes/functions.php'); include_once('includes/connection.php'); if(isset($_POST["submit"])) { echo add_user(); } …

Member Avatar for pritaeas
0
2K
Member Avatar for Tko_1

Hello so i have this encode/decode script <?php // Encoding key $key = "vns98ogavna5489hverz9np950yhz9gzx89fghjv9pv4598hj"; function encode($string,$key) { $key = sha1($key); $strLen = strlen($string); $keyLen = strlen($key); for ($i = 0; $i < $strLen; $i++) { $ordStr = ord(substr($string,$i,1)); if ($j == $keyLen) { $j = 0; } $ordKey = ord(substr($key,$j,1)); …

Member Avatar for Tko_1
0
237
Member Avatar for AhmedHan

I heard a rumour that there is a program named "PHP Tripod" that does the same thing as PHP, MySQL and Apache. Like "three in one". The reason I am looking for this program is having troubles with Apache. Do you know how can I get this program? I searched …

Member Avatar for cwarn23
0
333
Member Avatar for ribrahim

Hello, I'm using fpdf library to generate pdf invoice. I manage to view the pdf invoice for one item row only. below is the code: $qry = "SELECT invitems.itemId, invitems.invoiceId, invitems.itemNumber, invitems.ChargesID, invitems.itemDesc, invitems.itemAmountO, invitems.itemAmountP, invitems.discountAmount, charges.ChargesTitle, invitems.itemqty FROM invitems LEFT JOIN charges ON invitems.ChargesID = charges.ChargesID WHERE invoiceId = …

Member Avatar for ribrahim
0
2K
Member Avatar for hareeshshinde
Member Avatar for Gideon_1
0
143

The End.