Search the Community
Showing results for tags 'function'.
-
I'm developing a website for specific EVENTS. Each EVENT lasts for three months and has fixed start date and end date, and they repeat each year: Event 1: Jan. 1st – Mar. 31st Event 2: Apr. 1st – Jun. 30th Event 3: Jul. 1st – Sep. 30th Event 4: Oct. 1st – Dec. 31st I ha...
-
up votedown votefavorite I've been scraching my head for hours over this problem. I'm basically trying to fetch values from a loop inside a function to pass it to another foreach loop to get the desired results. And it is not working as I intend to. please, point me in the...
-
Hello! I'm starting to learn php and for practice I tried to resolve a simple exercise. the idea is to write a php function that inputs a tabe and returns +1 if positive numbers in the table are more than the negative ones. and return -1 if negative numbers in the table are more than the positive...
-
Hi all, I am trying to pass 4 variables from one php page to another php page containing a google maps api. The variables I am passing are geo coordinates. at the end I want to show the map on my php page however I am struggling with linking php and javascipt together. This is what I...
-
I have this html to let people select how how many color div wants to have from 1-3 <div class="color-side-a"> <p class="sideABCD-header">Side A</p> <div class="dimension-width"> <p class="dimension-WHC">Colors</p>...
-
Hey friends, I just started learning php. I want to know the difference between == and === I exactly want to know the comment section of the given code below. Thanks. <?php $mystring = 'abc'; $findme = 'a'; $pos = strpos($mystring, $findme); // The !== operator can also be used. U...
-
Hi I am really struggling here i want this to check for fobidden words in an effort to stop sql injection. I cant seem to get it to work function secureit() { global $items_check; $unallowed = array('href', 'www', 'UPDATE', 'INSERT', 'DELETE', 'SET', 'OFFSET', 'ORDER BY', 'union...
-
I' stuck with writing function for searching replaced numbers and would really appreciate if someone can tell me what I'm doing wrong. My table structure looks like: CREATE TABLE servis.zamjene_brojeva ( id INT(11) NOT NULL AUTO_INCREMENT, vrijeme TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPD...
- 13 replies
-
Hi guys. why is my function error: undefined varable pdo? Thanks function referralCount($uid,$reflvl) { $stmt= $pdo->query("SELECT * FROM scraffiliateusr WHERE usrinvby='$uid'"); $nusrref1 = $stmt->rowCount(); //$arrusrref1 = $stmt->fetch(PDO::FETCH_LAZY); $reflvl1=$nusrref1; $ttlre...
-
Hi everyone, I would like to know if: I have three different forms to create three different mysql codes. Now my code will generate the three mysql codes correctly but each time I tried to generate the second mysql code using another form, the previous will get wiped and therefore I can only...
-
I have included language file and function file in my index.php include 'includes/functions.php'; include 'languages/english.php'; english.php contains <?php $lang['success']['a'] = 'Settings have been updated.'; $lang['error']['b'] = 'Database error. Please try again later!'; ...................
-
function abuf_user_add($name,$password,$email,$isadmin) { global $af_con; if((empty($name)) || (empty($password)) || (empty($email)) || empty($isadmin)) { return false; // for check that is not empty } $n_email =mysqli_real_escape_string($af_con,strip_tags($email)); if(!filter_var($n_email,...
-
<script type="text/javascript"> function listBoxSearch(){ var input = document.getElementById('searchBox'), output = document.getElementById('listBoxF'); if(input.value != ''){ for (var i = 0; i < output.options.length; i++){ if(output.options[i].text.substring(0, input....
- 2 replies
-
- javascript
- function
-
(and 3 more)
Tagged with:
-
hi there i am a beginner in PHP and i really would like some help with this..... i need to make use of the date() function to retrieve the current date. Use the split() function to retrieve the day month and the year from the current date. and the calculations to display the age. if anyone c...
-
Hi all, I have 3 files, namely, [custom.js / allitem.php / fetch_pages.php]. where i have been compiling, studying and at the same time create a website of my own. I am a total newbie, so i gather examples from the entire web and try to put it together. But right now, I am stuck for 3 long days goi...
-
What's wrong with this simple script to call 2 functions: if (up < max){ lower.onclick=min_function; } else if (up > min) { lower.onclick=max_function; }
- 3 replies
-
- flipper
- javascript
-
(and 2 more)
Tagged with:
-
Hi everyone. I am using Wordpress and have a calendar plugin I'm using to display events. I'm trying to get the output of a function to display differently in one of my templates (have the output on one line). By default the plugin is having the output appear on multiple lines. Is it possible to wra...
-
Hello All, I am trying to turn a PHP application I made about a year ago into a WordPress plugin. I'm reasonably new in the world of WordPress plugins and have what I think will be a simple question. My plugin creates a shortcode, and when the WordPress page with that short code on is loade...
-
I need help with my code. I'm trying to make it so that when I hit the withdraw button the money is withdrawn and the new amount is shown in the text box. As of now, when I hit the money buttons the money is withdrawn. The withdraw button does nothing. I can't figure out what I did wrong. assig...
- 1 reply
-
- javascript
- html
-
(and 1 more)
Tagged with:
-
Hi there i have recently started working with php so I will probably be a familiar name around here. I have been giving a task that I have got a bit stuck with. To give a brief overview I have products that are stocked in x number of warehouses, when a customer places an order depending on their...
-
Hello! Second post here. I'm new to PHP and have an idea of what needs to be done, but im not sure the best way to impliment it. Basically im looking for direction on whether I should use JS, AJAX, Jquery, or something else. from browsing around im guessing its going to be a combination of AJAX and...
-
I am trying to create a script (from a tutorial I try to adapt to my own needs) and I am running into a few problems. Here I go... I have an /includes folder which contains the following: database.php and functions.php with the following content: database.php <?php // Database connectivit...
-
So this is my 2nd PHP class ever. And this right here is part of my final. I'm sure you all know what the "shuffle" function does. What I thought I could make it do was randomize a bunch of echoes I have. Is that possible? Any help would be greatly appreciated. KCCO! Here's the code I need tweake...
-
Hi guys, I am trying to understand these questions regarding function and how or where can i get some knowledge to understand and create the code. questions are: 1. Open the text file “status.txt” as read only using variable $handle to store the file handle. 2. Begin a session. (what does it me...