10,940 Topics

Member Avatar for
Member Avatar for lester_2

<?php $db = new Db(); $mysqli = Db::$_mysqli; if (isset($_POST['name'])) { $name = escape($_POST['name']); $email = escape($_POST['email']); $phone = escape($_POST['phone']); $password = escape($_POST['password']); $result = array(); /*check email is unique*/ $email_num = $db->GetNum("user","email='$email'"); if ($email_num == 0) { /*insert into database*/ $md5password = md5($password); $insert = $db->Insert("user","'','$name','$email','$phone','$md5password'"); /*success*/ if ($insert) …

Member Avatar for lester_2
0
9K
Member Avatar for lester_2

This the code in products <?php require_once("inc/header.php"); require_once("inc/navbar.php"); /* if user is logged in then only allow the user to view the page */ if (!isset($_SESSION['id'])){ echo "<h1 class='text-center text-upper text-bs-primary'>please login to view your cart <a class='text-black' href='login.php'>Login</a></h1>"; exit(); } else{ $user_id = $_SESSION['id']; } $carts = $db->FetchAll("*","cart","user_id='$user_id' AND …

0
304
Member Avatar for sashiksu

Hello everyone. I want to build a special form. It has different kind of input types text, radio,select and combo boxes. Specility of my need is this. *I need to insert one element value as one record to database. Let's assume there are two textboxes and radio button group. It …

Member Avatar for kinhkha1984
0
523
Member Avatar for sashiksu

Recently I'm trying to pass text boxes , radio buttons and checkboxes vaues to database. For that for the clear understanding I'll provide simple way of form. <form method="post"> <input type="text" name="KKK"><br> <input type="text" name="val[]"><br> <input type="text" name="val[]"><br> <input type="text" name="val[]"><br> <input type="radio" class="form-check-input" value="new" name="val[]">New <input type="radio" class="form-check-input" value="recondition" …

Member Avatar for alan.davies
0
4K
Member Avatar for Krishna_31

How i do remove duplicate questions from my excel file??? There are more then 150 questions in my excel file

Member Avatar for White_4
0
309
Member Avatar for Jara_1

$table = "<table>\n"; for ($i = 0; $i < sizeof($rounds); $i++) { $table .= "<tr><th>Week #: " . ($i + 1) . "</th><th>Match</th><th>Away</th><th>Referee</th></tr>\n";//table headers foreach ($rounds[$i] as $r ) {//iterate through an array $table .= "<tr> <td> Day :</td> <td> $r </td> <td>".$r["Away"]."</td><td> </td></tr>\n"; //i want to store values of …

Member Avatar for ryantroop
0
433
Member Avatar for Carlos_18

I am trying to select all rows from all tables in the database when a column equal a given name. I have like many tables with same structure and columns. I have written this piece of code but it throws an error. SELECT GROUP_CONCAT(qry SEPARATOR ' UNION ') INTO @sql …

Member Avatar for White_4
0
12K
Member Avatar for sashiksu

heY guys :) recently I'm on web project which I use MySQL, bootstrap, PHP and Javascript. For this I have generated successfully dynamical forms using PHP. I'm using mysqli commands. I used dynamic forms if it not used I have to create hundred of html pages. So by doing this …

0
573
Member Avatar for Andrew_52

I have a table on my web page that is currently updating with random Data, see below: function changeContent(){ var i = 1; var len = numberRows; var random1 = Math.floor( Math.random() * 90 ) + 10; var random2 = Math.floor( Math.random() * 90 ) + 10; var x=document.getElementById('myTable').rows; var …

Member Avatar for ryantroop
0
581
Member Avatar for Maqsood_4
Member Avatar for pty
0
142
Member Avatar for James_103

I have a simple MySQL database keyword search that is functional. However results for the search are not being returned if the keywords are not in the same order as entered in the database. For example searching for "dog cat mouse" will return a result, becuase this is the order …

Member Avatar for pty
0
354
Member Avatar for annya

Hello, Iam getting an fatal error " PHP Fatal error: Cannot redeclare class MysqlConnect " It was my connection file and the website was working from the past two years. Yesterday on of my friend said my website was down so that time i noticed this issue I got the …

Member Avatar for rproffitt
0
2K
Member Avatar for prashant_17

I have a script for product Invoice which save details of sold product, but it do not update stock quantity when any product sale. Product quantity in stock remain the same which should decrease.. here is the code to save invoice details using for each loop : <?php function saveInvoice( …

0
256
Member Avatar for josh_7

Hey everyone i am just asking for a little bit off help if thats fine how can i make 11 fetch scripts into 1 script please [database ](https://i.imgur.com/BTGQF1P.png) i like to make this menu to display the coins i know you can do it but i dont know how since …

0
351
Member Avatar for Vamshi_4

select * from CNPSCAR.HRZ_data where EMPLOYEENUMBER like ('%1064525','%6529623','%2264218','%1065793','%2264129','%5372488','%2062550') when executing this command i am getting error missing right parenthesis. Syntax and command looks correct can anybody help in fixing this.

Member Avatar for pty
0
173
Member Avatar for mysterious_1

Hello, I am looking for a new IDE. I am currently using netbeans to develop a website in php/mysql. I like a lot of things about netbeans, but I don't like that it doesn't come with built in compilers/debuggers. You have to manually go and add/link them on a language-by-language …

Member Avatar for mysterious_1
0
655
Member Avatar for David_133

I have db table called **subscription** and a column called **duration**. I want the column** duration** to be incremented by +1 in every 24 hours until it gets to 30 then stop. I would love the query to start execution if the column duration is = 1.

Member Avatar for prof php
0
496
Member Avatar for Hamsterking

hello hope you all are going well, so my vacation is comming and i was wondering whta if i did a big project or small project, how hard is it to make my own multivendor website like amazon, i would like to do everything like the code in php, the …

Member Avatar for overwraith
0
553
Member Avatar for mirapsm

How to display an available room using date range? below is a code, where is display all the room on that date. its should display a room that had not been booked between two dates. my input : $datein = 31-12-2014 $dateout = 01-01-2015 below is database : ---------- room …

Member Avatar for Jun_7
0
4K
Member Avatar for Nurul_3

Hello .Im a final year student in bachelor of science computer in web technology. I need your suggestion for my final year project title.Do you have any related ideas?

Member Avatar for happygeek
0
688
Member Avatar for Amaina

I have been cracking my head on this mater in the past couple of days. I am faced with a situaton where i need to write a MySQL equivalent of PHP code to loop through sql select results. The Php code looks like this $query = "SELECT pubid, author FROM …

Member Avatar for flashx4u
0
19K
Member Avatar for Dave_20

Hey guys. So this should be a pretty simple question (but doesn't appear to be) that I'm hoping some of the database wizards out there can help me with. I'm not too long outta university with a BSC in Computing, I didn't get a full classification due to the fact …

Member Avatar for overwraith
0
616
Member Avatar for janicemurby

hi all i have recently purchased a script and im attempting to fix it would anyone know how to solve these 2 errors which appear to be coming from this function [09-Jun-2018 12:40:57 UTC] PHP Warning: Division by zero in /home/public_html/includes/functions.php on line 126 [09-Jun-2018 12:41:19 UTC] PHP Fatal error: …

Member Avatar for rproffitt
0
316
Member Avatar for savedlema

Greetings! I got a mysql database "backup" that someone made and I have to use it, trying to get a website back online. Its a Joomla web database. The person gave me a file "database.txt" (not database.sql) which opens with Notepad. Trying to "import" in phpmyadmin does not work and …

Member Avatar for Daniel_87
0
751
Member Avatar for janicemurby

hi all im getting the following error PHP Notice: Array to string conversion in /home/public_html/includes/database.php(23) : eval()'d code on line 1 in this file <?php $link = @mysqli_connect($hostname, $username, $password, $database); if (!$link) { die('Could not connect !'); exit(); } else{ mysqli_set_charset($link,'utf8'); } $sqlcf = 'select Variable, Value from '.$table_prefix.'site_settings …

Member Avatar for alan.davies
0
3K
Member Avatar for Narayanan_1

echo '<td><a href="details.php?id=' . $row['ServerName'] . '">' . $row['ServerName'] . '</a></td>';--> it's working as expected( but it always display the one table value without any matching criteria hence i am trying with if condition as below) if($row['ServerName']=='DataBase')<< curly start brace>> echo '<td><a href="db.php?id=' . $row['ServerName'] . '">' . $row['ServerName'] . …

0
160
Member Avatar for Akinjide

I'm developing an online shopping website using HTML, CSS and Bootstrap. I just got stuck. * How do I create a responsive shopping cart that adds up all the shopping items/products and gives a full details and total price of items bought at checkout? * How do I access the …

Member Avatar for Akinjide
0
464
Member Avatar for Dani

I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.

Member Avatar for PARDEEP_2
1
1K
Member Avatar for keerthi_3

<?php session_start(); if (!isset($_SESSION['id'])) { header('location:login.php'); } ?> <?php $nameErr = $emailErr = $usernameErr = $DateOfBirthErr = $departmentErr = $ageErr = $fileToUploadErr = $fileToUploadErrr = $fileToUploadErrrr = $fileToUploadErrrrr = $fileToUploadErrrrrr = "" ; $name = $email = $username = $DateOfBirth = $department = $age = $fileToUpload = $filename = $file …

0
229
Member Avatar for divinity02

hi I have a login form, when i tried to login i got this two errors: **Notice: Undefined index: username in C:\wamp64\www\FormTutorial\php\luana_login.php on line 6** ** Notice: Undefined index: password in C:\wamp64\www\FormTutorial\php\luana_login.php on line 7 ** I have been busting my head to figure out how to solve it so …

Member Avatar for alan.davies
0
242

The End.