count logical lines of code in Ubuntu
I am working on a web application and I need to be able to keep track of php, css, html and JavaScript lines of code within the /var/www directory.
But using the terminal lines of code counter, I naturally feel like writing more lines and spacing out code like:
if($var == $other)echo(“hi”);
would be done as:
if($var == $other)
{
[...]
AJAX fails only inside JQuery dialog box
How it works
I have a page called displayRecord.php which is loaded inside a
JQuery dialog box. The dialog box is created inside editTicket.php
Basically the displayRecord.php allows a user to add a username &
ref id and via AJAX $.post it updates the DB and retrieves the
number of record in the respective table.
The retrieve counter step is also [...]
Use PHP to hold HTML while keeping animation
Good Evening,
I have a website and so far I am copying the navigation code across every page. Annoying right
However I’d like to use PHP or something to hold the HTML so I only have to edit one file. However because of the way the navigation bar operates there’s a class called [...]
Error – Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
I am receiving the following two errors:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\SystemVehicle\delete_multiple.php on line 51
Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\xampp\htdocs\SystemVehicle\delete_multiple.php on line 75
$sql=”SELECT * FROM $userlogin”;
$result=mysql_query($sql);
//count table row
$count=mysql_num_rows($result);
?>
<table width=”400″ border=”0″ cellspacing=”1″ cellpadding=”0″>
<tr>
<td><form name=”form1″ method=”post” action=”">
<table width=”400″ border=”0″ cellpadding=”3″ cellspacing=”1″ bgcolor=”#CCCCCC”>
<tr>
<td bgcolor=”#FF0000″> </td>
<td colspan=”4″ bgcolor=”#FF0000″><strong>Delete [...]
Im a student me and my friend started doing websites for people but i need some form of CRM [closed]
Im a student me and my friend started doing websites but need some form of keeping track. I need a simple CRM thats free and will run on php on my godaddy account. The most important thing is it will tell me when someones hosting expires so i can bill them again.
It should also let [...]
What’s the best method for detecting tags with PHP?
I would like users to be able to insert tags like the following:
Lorem ipsum dolor sit amet, {module_user_name, 123} consectetur adipiscing elit.
As you can see in the example above, the tag has a couple of arguments. The first being the function required, and the arguments will depend on the function requested.
So I would use [...]
CURL Delete request to Instagram API fails
Im trying to unlike a photo that I just liked on Instagram with a call to the API. My url is exactly as the URL in instagrams API tool. Im using Curl. I get an empty response, no error or status code.
Here is my “like/unlike” method written in javascript.
likeImage: function(type, id)
{
var [...]
PHP Setting Normal Variables Changing Session Variables
I just suddenly starting having the weirdest problem I’ve ever seen, and nothing has changed except the host of my site. I use a lot of $_SESSION variables in my code that might have the same name as a normal variable, but setting the normal variable seems to be changing the $_SESSION variable with the [...]
How to change value for ‘options’ and ‘select’ in wp_dropdown_categories?
I am currently using this code to display only the child terms of the current category being viewed -
<?php
//first get the current term
$current_term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
//then set the args for wp_dropdown_categories
$args = array(
‘child_of’ => $current_term->term_id,
‘taxonomy’ => $current_term->taxonomy,
[...]
json decode not working
I have a data i want to json_decode, the data was json_stringify before being sent to PHP and the data looks like this:
{\”data\”:{\”buildingID\”:{\”2\”:{\”path\”:[[11,11],[10,11],[10,10],[9,10],[8,10],[8,9],[8,8],[8,7],[8,6]]}}}}
In my script i have:
echo $_GET['as']; //this is what you see above^
$obj = json_decode($_GET['as']);
echo $obj; //no output
var_dump($obj); //this shows NULL
There are also no errors/notices/warnings in my error logs either.
I’m wondering if the [...]















