10,940 Topics
| |
<?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) … | |
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 … | |
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 … | |
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" … | |
How i do remove duplicate questions from my excel file??? There are more then 150 questions in my excel file | |
$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 … | |
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 … | |
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 … | |
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 … | |
Hello Everyone, I need an information about how to join in query in MYSQL. | |
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 … | |
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 … | |
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( … | |
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 … | |
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. | |
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 … | |
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. | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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'] . … | |
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 … | |
I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it. | |
<?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 … | |
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 … |
The End.