Latest Posts

New on

Announcements & Support 1214 24

AdminFTM2S - File Transfer Manager between two Servers
Ajax - PHP web application that can be used to transfer (copy) files and folders from one server to another with the FTP PHP extension; also, it can rename and delete files and folders on both servers.
- Script...

Replace the "mysqli_" prefix from the function name with the object that store the connection.
For example:
// connect to database
$dbh = mysqli_connect($db_hostname, $db_username, $db_pass) or die ('I cannot connect to the database because: '. mysqli_connect_error());
Or, add the object...

AdminDo you prefre ASP server side language, or PHP?
- I prefer PHP because I do not know ASP; PHP is free, and the hostings with PHP are cheaper.
But, because I not know ASP, I can't say something about it....

Error in Javascript string with new lines from php

JavaScript - jQuery - Ajax 14 1

I think I told you in other topic, The resulted sting in javascript must be on a single line, or each new line escaped with "\".
var str ='line1..<br>line2';
var str = 'line1..<br>\
- Try replace your code...

Simple PHP Comment Tree

PHP - MySQL 15 4

AdminYou have to change all mysql_ functions that get and parse data from database with their mysqli correspondent....

Try addapt the code from this example to your script:
<div id="check1">
<input type="checkbox" value="1" />Chb-1
<input type="checkbox" value="2" />Chb-2
<input type="checkbox" value="3" />Chb-3<br>
<button id="1" class="btns">Click</button>
<div id="check2">
<input type="checkbox" value="1" />Chb-1a
<input type="checkbox"...

CKEditor - Delete option in imgbrowse

Scripts from this website 653 2

chillWhen I set this up as directed it did not work, but when I added '. $del .' at the end of this line it worked. Hopefully, this will help others with the same problem.
if($fileobj->isFile() && in_array($fileobj->getExtension(), $this->imgext)) $re['imgs'] .= '<span><img src="'. $site . $this->root . $this->imgdr . $name .'"...

AdminThe problem is with the script logic. If the $_POST['data2'] not exists when there is "submit", the variable that takes data from $_POST['data2'] will not be defined.
Maybe the solution is to re-think the script logic.
If you apply: var_export($_POST); you will see what $_POST data exists, that...

To transfer value from <select> tag to php you need to use <option> elements in <select>, and send data via a form with Submit button (or some javascript).
The "value" is added in <optioin>.
For example, you can use something like this:
<form action="prelucrate.php" method="post">

File Upload don't work

PHP - MySQL 54 3

AdminI not know whay it not works, it might be problem from the html form, or the column types in mysql, or variable with data for inserting in mysql is not defined.
If there is no error, try add: echo $sql; to see if all data are properly added...

JavaScript to Check if Div is in viewport

JavaScript - jQuery - Ajax 30 1

AdminTry the JavaScript script and example from this page:
- It can be used to check if a html element is in viewport, and to get its size and top/left position in page....

AdminThis function, getBoxPS(), can be used to get the position and size (in pixels) of html elements in page.
It returns an object with four properties: {x:left, y:top, w:width, h:height}
//JavaScript function to get position and size of html element - /> //receives the element; returns object:...