39,320 Topics
| |
what is the difference between client-side programming language and server-side programming language? Why javascript is only a client-side programming language, but PHP is a server-side programming language? I am a newbie starting web development and need some advice. | |
i have following code first insert is working properly and data in to database but second insert query which depends on last_insert_id() fails.I have tried to find out mistake but failed to do so? <?php namespace Solutions\File; class AddUserData { function __construct($DB_con) { $this->db = $DB_con; } public function insert_detail($productDetails){ … | |
I have a working search database and it's query code says $criteria = $_POST['criteria']; $query = "SELECT * FROM table WHERE field LIKE '%".$criteria."%' Order by Appeared asc"; but I want it to omit results that contain the word but are more then the word example the criteria might be … | |
Alo All, I am really really tired of searching for a simple file manager for PHP/Code Igniter. I am not looking for advanced one at all: 1. No MYSQL 2. NO user tracking 3. Basic File Operations (copy, move etc) 4. Multi upload (in anyway) I have tried fileman and … | |
$mysql_hostname = "localhost"; $mysql_user = "root"; $mysql_password = ""; $mysql_database = "loan"; $connect = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Something went wrong..."); mysql_select_db($mysql_database, $connect) or die("Something went wrong..."); if(isset($_POST['btn_submit'])) { $datess = $_POST['datess']; $control = $_POST['control']; $payee = $_POST['payee']; if(!empty($datess) && !empty($control) && !empty($payee)) { mysql_query("INSERT INTO `sales`(`datess`, `control`, `payee`) VALUES … | |
Hi guys, I try to calculate number of month between 2 selected dates and i just got this code. The problem is this code calculate number of days and i try change the code from **var days = (end - start) / (1000 * 60 * 60 *24) ;** to … | |
Usually I am very conservative about upgrading in production even partial. But the moto “PHP 7 is not an evolution is a revolution” made me want to try it also in production in just one specific folder that serves few sites. Here are my first two observations about things that … | |
HI, In a page I load table in while loop with time duration calculation for multiple times. I want to display time difference in their respective rows. Here I included my code. <?php $a = mysql_query("SELECT * FROM user")or die(mysql_error()); $a_count = mysql_num_rows($a); if($a_count > 0) { ?> <table border="1" … | |
I followed this site -> https://www.box.com/blog/how-to-debug-php-with-vim-and-xdebug-on-linux/ but I'm not having much luck. I followed the firections and my phpinfo() functions is showing that xdebug is up and running but I see don evidence of xdebug from within vim. I typed in my localhost url, localhost/mysite.php?XDEBUG_SESSION_START=1 and then wen to vim … | |
Just started learning codigniter and as far I learned from tutorials and by reading documentation I got and idea a basic about how to develop websites using codigniter as far as we see by using MVC framework there are many advantages so my questions is let suppose if we start … | |
hi im following a tutorial and when i went to test the login i press login but nothing happens can anyone check the code as i cant se whats up with the form <?php session_start(); include("includes/database.php"); if(isset($_POST['login'])) { $email = mysqli_real_escape_string($con,$_POST['email']); $pass = mysqli_real_escape_string($con,$_POST['pass']); $get_user = "SELECT * FROM users … | |
This question is about querying an XML file. The file structure is below: Inline Code Example Here <?xml version="1.0" encoding="UTF-8"?> <descriptions> <image> <name>run.jpg</name> <text>Running around the lake</text> </image> <image> <name>sail.jpg</name> <text>Sailing around the lake</text> </image> <image> <name>track.jpg</name> <text>Tracking up the mountain</text> </image> ... <image> <name>Steven.jpg</name> <text>Steven Bullon is a photographer</text> … | |
I am doing a start up and am figuring out my stack. I've been using php for around 5 years now and am extremely familiar with it. However, I've recently been introduced to node.js and have seen it is on the rise. I'm not sure what to use for server … | |
HI im getting the following error Warning: Invalid argument supplied for foreach() in /home/jktempla/public_html/includes/class-query.php on line 106 in the following bit of coding can anyone see whats happening public function do_user_directory() { $users = $this->load_all_user_objects(); foreach ( $users as $user ) { ?> <div class="directory_item"> <h3><a href="/social/profile-view.php?uid=<?php echo $user->ID; ?>"><?php … | |
I have a strange problem here is code snippet for form having bootstrap tab when after filling all form fields i submit the form no error or form fileds are posted,there is something wrong with my html however my validations and other backend code is working for other form but … | |
When I login same script works for first user but for other user, it gives error in connection. More over i want to fetch data from database Main File is <?php include_once("../init.php"); validation_check($_SESSION['SID'],MEM_HOME_ADMIN); $msg=''; $dir ='../'.USER_PIC; $sId = $_SESSION['SID']; $query = mysql_query("select * from user WHERE user = ".$sId) or … | |
Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . $row['im_description'] . '</div>' . '</td>' '</tr>'; I don't want it to appear in this format: <tr> <td style="text-align:left"><div class="describe"><?php echo … | |
can anyone give me php email template??, i have form ready and the fields name are as shown below: Name: Email: Phone: Subject: Message: pls help me i have email template design you just give me php code that shows that template in email | |
Hi all, I need to add a contact form to a site I'm working on. I'm just thinking whether it would be better to go with an online solution (grab a form from somewhere and use it on my site) or building my own thing (complete with captcha etc). I'm … | |
<?php if (isset ($_POST['submit'])) { try { $picture = "../images/default-picsss.png"; $sql = " INSERT INTO user (username, password, fullname, address, mobile, email, picture) VALUES (:username, :password, :fullname, :address, :mobile, :email, :picture ); INSERT INTO user_balance (username) VALUE (:username); "; $stmt = $PDO->prepare($sql); $stmt->bindParam(':username', $_POST['username'], PDO::PARAM_STR); $stmt->bindParam(':password', $_POST['password'], PDO::PARAM_STR); $stmt->bindParam(':fullname', $_POST['fullname'], … | |
Hi, i have a code in my cgi script for replace text(for example replace red ro blue) $STR_SEARCH='red' $STR_REPLACE='blue' this work fine.but when i want use gzip for compression,gzip will not work but when i disable the replace,gzip will be work fine. please help me ,that how i can enable … | |
hi have been doing a bit more of the tutorial and im trying to show errors if someone doesnt fill in information but the required notice isnt showing all im getting is is required. is required. is required. is required. when it should show the following: username is required etc … | |
I was trying and trying to get this to work as expected I got this chain drop down menu to work but the problem how can I edit or retrieve data to edit pls if you have time look at my script here on (MS oneDrive) https://onedrive.live.com/redir?resid=B6ED478A72FB6A78!33834&authkey=!AO9oNU_4snXOqH4&ithint=file%2czip the three drop … | |
Hi, I need your help for forgot password decryption. When a user registers , his password will be encrypted using md5(); and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table, My problem is, If he … | |
Hello. I have created a filter result using php but it is not properly working for me when i filter result it is not showing me up with any products <form method="POST" action="product.php?cat=<?php echo $cat; ?>"> <div class="price-box"> <h5>Price</h5> <input type="hidden" name='price_range' class="range-slider" min="0" max="600" value="23" /> </div> <div id="filters"> … | |
Hi, How we can know , a user requested for forgot password? | |
* <?php mysql_connect("localhost","root","") or die ("could not connect"); mysql_select_db("search_test") or die ("could not find db!"); //collect if(isset($_POST['search'])){ $searchq = $_POST['search']; $searchq = preg_replace("#[^0-9a-z]#i","",$searchq); $query = mysql_query("SELECT * FROM members WHERE firstname LIKE '%$searchq%' OR lastname LIKE '%$searchq%'") or die ("could not search!"); $count = mysql_num_rows($query); if ($count == 0 ) … | |
here is my sample code: addqtr.php <?php $quarter=$_POST['quarter']; $sql="Select * from $quarter where id=?"; $res=$db->prepare($sql); $res->execute(array($pqid)); while($rowadd = $res->fetch(PDO::FETCH_ASSOC)){ $num=$rowadd['id']; $pushup=$rowadd['pushup']; $situp=$rowadd['situp']; } ?> <form method="post" name="frmQuarter" action="saveqtr.php"> <input type="hidden" name="qid" value="<?php echo $pqid; ?>"/> <table> <tr> <td>Select Quarter</td><td>:</td> <td> <select id="quarter" name="quarter"> <option selected></option> <option value="1qtr">1st</option> <option value="2qtr">2nd</option> <option … | |
hi im following a tutorial for a system running on PDO and i have encountered a error can anyone check this out Fatal error: Call to a member function count() on a non-object in /home/matureco/public_html/classes/User.php on line 21 user.php public function find($user = null) { if($user) { $field = (is_numeric($user)) … |
The End.