39,393 Topics

Member Avatar for
Member Avatar for spud91

I have the following code: <?php session_start(); include_once("config.php"); $query = "SELECT Category FROM books"; $result = mysqli_query ($mysqli, $query); echo '<select name="dropdown" value=""><option value="">Dropdown</option>'; while($row = mysqli_fetch_array($result)) { echo '<option value="' . $row['Category'] . '">' . $row['Category'] . '</option>'; } echo "</select>"; ?> the values of the drop down box …

Member Avatar for hericles
0
220
Member Avatar for Geekmonir

is there any way to access the variables of this function outside ? public function selectData($table, $where = null, $wheree = null, $where1 = null, $wheree1 = null) { $QUERY = mysql_query("SELECT * FROM " . $table . " WHERE '" . $where . "' = '" . $wheree . …

Member Avatar for broj1
0
178
Member Avatar for christos312

Hello to everyone. First of all let me say that I know that there are TONS of threads with the same subject. BUT the other threads are dealing with PHP vs ASP question in general and I have a specific question. :) So, I have to choose between PHP and …

Member Avatar for DaveAmour
0
809
Member Avatar for rkara924

I am having an issue at with the browser refresh button. For some reason when I go to a page and click refresh it takes me back to wherever I started. For instance if the user goes to the Home page first then goes to Projects and then clicks refresh …

Member Avatar for rkara924
0
322
Member Avatar for stokie-rich

Morning people hope you're all well. I really need some advice from yourselfs. As you might know I'm in the middle of creating my own website. The site will let users register and to log in. I want to create a quiz I have found some code from this site …

Member Avatar for stokie-rich
0
7K
Member Avatar for ramsiva

$min=7500; $hours=$min%60; but it is not working. I am facing convert minutes to hours. please help me

Member Avatar for diafol
0
126
Member Avatar for Jaklins

TLDR: When large amounts of files (array values) are in the array, the loop will iterate through all the values but only execute part of the foreach statement for some of them. When that happens, it will always affect the same files (in file order, not file name). Detailed version: …

Member Avatar for diafol
0
449
Member Avatar for mattyd

I have been cleaning up my server of useless files - I double-checked each file to make sure it was definitely unneeded, so nothing I removed is causing this issue. This is the bug; It involves a form: * I filled out a form and submitted it to the DB …

Member Avatar for diafol
0
261
Member Avatar for enterdani
Member Avatar for singhsd2005

why this code give error like "Warning: json_decode() expects parameter 1 to be string, array given in <b>E:\wamp\www\datefun\show_cart_update.php</b> on line". Please help me. I am new in php and json <html> <head> <title>Untitled Document</title> <script src="js/jquery-1.9.1.min.js"></script> </head> <body> <script> function update_cart_detail() { var aData = new Array(); aData[0]={ "session_id":"64qu9ng2o8o996s21bjt9321h1", "order_id":"26", …

Member Avatar for diafol
0
453
Member Avatar for annya

Hello Iam getting an error in the pagniation page "Warning: mysql_real_escape_string(): Access denied for user 'username'@'localhost' (using password: NO) in /home/livehuqu/public_html/abcd.com/pptindex.php on line 19 " Warning: mysql_real_escape_string(): A link to the server could not be established in /home/livehuqu/public_html/abcd.com/pptindex.php on line 19 Iam using the same code in other website and …

Member Avatar for annya
0
470
Member Avatar for london-G

Hi Guys, I have been trying to display the images from the database with the code below. Images are not displayed. <?php while($product_data = mysqli_fetch_array($query_product_result)) { $num_rows_products = $num_rows_products - 1; Print "<div class='image_panel'><a href = 'products.php?prodid=" . $product_data["ID"] . "'><img src='data:image/jpeg;base64," . base64_encode($row['image']) . "' alt='' /></a></div>"; Print "<h2><a …

Member Avatar for almostbob
0
3K
Member Avatar for Rizi004

Hi everyone. I want to store greek letters in mysql table my table collaction is utf8_general_ci and i'm calling this function after database connection mysqli_query($connection, "SET NAMES 'utf8'"); mysqli_query($connection,"SET CHARACTER SET 'utf8'"); but all greek letters in database are like "??????? ???" Question mark how to resolve this ??? I …

Member Avatar for almostbob
0
272
Member Avatar for spud91

Hi Guys! I have the following code: <?php session_start(); include_once("config.php"); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>View shopping cart</title> <link href="style/style.css" rel="stylesheet" type="text/css"></head> <body> <br> <div id="books-wrapper"> <!-- #content to center the menu --> <div id="content"> <!-- This is the actual menu --> <ul id="darkmenu"> <li><a …

Member Avatar for spud91
0
9K
Member Avatar for Scoobs37

I need to change this script to c# as i am writing an MVC 5 website or any suggestions on how I can write it in C# it basically takes the post data from a rfid reader and pushes it to a web url. Thanks if you can help at …

Member Avatar for Scoobs37
0
754
Member Avatar for davy_yg

Hello, I am still having problem with this basic stuff in CI: viewlatihanci.php <button type="button" onClick="parent.location='cadd_latihan/'">Add Latihan</button><br><br> routes.php $route['default_controller'] = "latihanci"; $route['cadd_latihan'] = "cadd_latihan"; $route['scaffolding_trigger'] = ""; cadd_latihan.php <?php class Cadd_latihan extends Controller { function index() { $this->load->model('modellatihanci'); $data['records'] = $this->modellatihanci->tangkapdb(); $this->load->view('viewlatihanci', $data); } } ?> I wonder why when …

Member Avatar for cereal
0
968
Member Avatar for stokie-rich

Hi guys, creating a log in script so my users can login to my website. This is the code so far <!DOCTYPE html> <html> <head> <title>Richard Hemmings </title> <meta name="viewpoint" content="width=device-width, intail-scale=1.0"> <link href = "css/bootstrap.min.css"rel = "stylesheet"> <link href = "css/stylesheet.css" rel = "stlesheet"> </head> <body> <div class = …

Member Avatar for stokie-rich
0
394
Member Avatar for Neha_13

i have a page template assigned to a page, that displays the images of all the posttype=suspense...but how do i get voting button on each of the image so that ppl can vote on each image and restrict it to voting per ip. i have a custom field called count …

Member Avatar for diafol
0
309
Member Avatar for showman13

Good Morning, I am trying to create a function that will return a single value that represents the customer that will receive a reward... The source of the data that makes the determination is the banner_key table (partial - sample data) key_id mem_id bid created status keylock last_update 144 10000022 …

Member Avatar for showman13
0
193
Member Avatar for davy_yg

index.php <?php //image gallery $result = mysql_query("SELECT * FROM `image_upload`") or die(mysql_error()); while ($data = mysql_fetch_array($result)){ echo $data['title'].'<br>'; echo $data['news'].'<br><br>'; //echo '<img src="images/'.$data['newfilename'].'">'; echo '<style> .circular { width: 300px; height: 300px; border-radius: 150px; -webkit-border-radius: 150px; -moz-border-radius: 150px; background: url(http://localhost/portal_bootstrap/images/'.$data['newfilename'].') no-repeat; } </style>'; echo '<div class="circular"></div>'; } ?> Hello, I thought …

Member Avatar for rtrethewey
0
102
Member Avatar for Djmann1013

I am having a problem with this code. I looked into the issue and found no answer. When I run this code I get this: `username1username2{"username":"Username1", "username":"Username2"}` Instead of the desired result: `{"username":"Username1", "username":"Username2"}` Here is the code: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $db = mysql_connect('localhost', '', ''); mysql_select_db("roblox"); $query = …

Member Avatar for matrixdevuk
0
138
Member Avatar for mattyd

Hello. I am attempting to add a Google reCaptcha to my form. This form is located on an .html page, but I am reading documentation that states I should rename the page with a .php suffix. I did this and reloaded the page and, obviously, nothing was displayed at all. …

Member Avatar for annya
0
227
Member Avatar for KingGold171

Hiya DaniWeb members, Before starting it's not basic $variables I need help with. I've been working on a project lately for a Minecraft Server website and this project will work alongside the MCMMO plugin. Most of it works but I would like some help/advise on how to turn $nextLevel = …

Member Avatar for jkon
0
209
Member Avatar for london-G

Hi Guys, I have this script to insert attribute values in the database. When I run it, only the first value of the array is inserted. Could someone help me? <?php require_once('./app/Mage.php'); Mage::app(); $arg_attribute = 'manufacturer'; $manufacturers = array('NW163UA G70-467','NW167UA G70-481','VM113UA G71-333','VR759UA G71-340','VM114UA G71-343','VM110UA G71-347','VM116UA G71-349','VR761UA G71-358','VR760UA G71-400'); $attr_model = …

Member Avatar for london-G
0
195
Member Avatar for davy_yg

Any clue how to show part of the articles that I retrieve from the database? I mean what is the function. Thanks before. Davy

Member Avatar for edbr
0
120
Member Avatar for khin thida phyo
Member Avatar for hyperj123

Haven't coded in php in a while and I'm now drawing blanks. Could someone simply correct my syntax on this? <?php session_start(); if $_SESSION['user_name'] == 'john', 'mike'; include ("audit_live.html"); else include ("audit.html"); ?>

Member Avatar for hyperj123
0
116
Member Avatar for Neha_13

i have a gallery of images withbutton for each when button for a image is click i want the custom field called count be updated with the newcount ...but form method is not working below is my code PHP Code: <? if (isset($_POST['submit'])) { echo " button clicked"; update_field('field_55014',$newcount,$postid); } …

Member Avatar for Neha_13
0
180
Member Avatar for stephen_UK

I am very new to the Mysql/php environment so would appreciate guidance here please. 1) I have a php program that uses a Form to enter data into a MySQL table. This is working OK when data is entered into the fields manually. 2) I have a short php script …

Member Avatar for Yuges
0
484
Member Avatar for mattyd

Hello. I am beginning the process of implementing password encryption for User's on my future site (The site is not live or available yet). I have been reading up on hashing passwords and storing them in the database. **My question are as follows**: * I believe it has said that …

Member Avatar for iamthwee
0
395

The End.