39,316 Topics

Member Avatar for
Member Avatar for slowlearner2010

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 …

Member Avatar for Haji Sameon
0
2K
Member Avatar for jkon

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 …

Member Avatar for diafol
0
210
Member Avatar for AntonyRayan

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

Member Avatar for diafol
0
268
Member Avatar for lewashby

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 …

Member Avatar for lewashby
0
339
Member Avatar for UK-1991

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 …

Member Avatar for cereal
0
1K
Member Avatar for janicemurby

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 …

Member Avatar for janicemurby
0
188
Member Avatar for rouse

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

Member Avatar for rouse
0
239
Member Avatar for garyjohnson

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 …

Member Avatar for Kyle Wiering
0
287
Member Avatar for janicemurby

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 …

Member Avatar for Johnny1
0
466
Member Avatar for shany0786

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 …

Member Avatar for diafol
0
10K
Member Avatar for Jatinder_1

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 …

Member Avatar for pritaeas
0
191
Member Avatar for mexabet

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 …

Member Avatar for mexabet
0
398
Member Avatar for MikdadAli

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

Member Avatar for BenWard
0
225
Member Avatar for Violet_82

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 …

Member Avatar for Violet_82
0
424
Member Avatar for Shabbir_1

<?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'], …

Member Avatar for diafol
0
196
Member Avatar for Vijithakv
Member Avatar for body212

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 …

0
115
Member Avatar for janicemurby

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 …

Member Avatar for janicemurby
0
151
Member Avatar for Yousef Altaf

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 …

Member Avatar for diafol
0
201
Member Avatar for AntonyRayan

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 …

Member Avatar for diafol
0
251
Member Avatar for UK-1991

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

Member Avatar for diafol
0
307
Member Avatar for AntonyRayan
Member Avatar for divyasuraya

* <?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 ) …

Member Avatar for cereal
0
236
Member Avatar for Raven_1

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 …

Member Avatar for Raven_1
0
226
Member Avatar for janicemurby

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

Member Avatar for cereal
0
6K
Member Avatar for mexabet

I'm experiencing an issue deleting data via PHP/MySQL query. The following is the error message: Delete product category failed. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 This is …

Member Avatar for cereal
0
774
Member Avatar for rakesh.r1024

I have enabled the Facebook re-authentication for my site (done in codeigniter) when the user is visiting a specific page. Here is my code : $(window).load(function() { $("a.facebook_reauth_login").on("click", function(e) { var t = $(this); e.preventDefault(); FB.usingButton = !0; var n = base_url; FB.login(function(e) { if (e.authResponse) { FB.api("/me", function(e) { …

0
107
Member Avatar for samertaha

hello i have an online gallery i used blueimp plugin to get the good features in it like lightbox and touch support ... you can look on it here : [www.aburaga.com](http://aburaga.com/en/gallery) as you see its a big cakes gallery with many categories and pagination ( i built it with codeigniter/php …

Member Avatar for samertaha
0
556
Member Avatar for Stefce

Hello guys i want to ask how can i update my website, i want to make website for random posts updates but im confuzed in creating it. My question is how can i add new posts, do i need to create html files everytime i write new post and update …

Member Avatar for diafol
0
182
Member Avatar for jelly46

How how do you change a value inside a variable, i'm having trouble executing this but can't find any examples for dummies.

Member Avatar for urtrivedi
0
200

The End.