First program is adding a new topic on forum second program reprtesents a form where we can fill data. so it will showing error undefined index conent and topic and the data is not inserted in my database please help me

Member Avatar
Member Avatar
+1 forum 1

I am trying to create a search box on my website that will allow readers to type in search words and display results strictly from all pages of my .org. I found a php code on this website that I think will do this? So I have created a page called "action_page.php" to process the keyword search request with the php code. I am missing something because it is all not working. I can type a keyword in the box and click submit but no results. Do I need to create a separate display results page? Or can I make …

Member Avatar
Member Avatar
+0 forum 2

$query = "INSERT INTO 'user-profiles' ('name', 'avatar', 'description', 'votes', 'pay_methods', 'location', 'user_id') VALUES ('sadj', 'qwesad', 'sadqwdqw', '0','sadsad', 'sadasdsad''4')"; $resultprof = $this -> conn -> query($query); votes and user_id are INT columns, and user_id is a foreign key. Making this insert on mySQL directly it works perfectly, but on my PHP the "success" is false....

Member Avatar
Member Avatar
+0 forum 2

Hi all I am a beginner and i was wondering can we write a code in PHP by which we can enter keyword in search box of any website and submit. so there will be 2 inputs to this php function: [CODE] function enter_keyword($website_url, $keyword) { } [/CODE] It will be a great help thanks in advance

Member Avatar
Member Avatar
+1 forum 7

Hi all, I am very new to PHP and MYSQL and have a class assignment I need help with. I am trying to make a page with an HTML form that will update my MYSQL database. You can view my pages online here: [URL="http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php"]http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php[/URL] I need help with the "Edit" section, if you look online. Here is the code for my Edit page: [CODE=PHP] <?php $hostname = "localhost";//host name $dbname = "baileyjumper_imd203";//database name $username = "baileyjumper_imd";//username you use to login to php my admin $password = "chris4ever";//password you use to login //CONNECTION OBJECT //This Keeps the Connection to the Databade …

Member Avatar
Member Avatar
+0 forum 20

Hi All, As part of a university project I need to create a website that sells cosmetic products. The customer will need to go through the motions of selecting the items, placing them into a basket and going through the checkout process. However I wouldnt need to use a card merchant to process the transaction. customers would also need to sign up and create an online account. I have created simple websites before, with HTML and CSS, but thats it. What development langauges would I need to know other than the two above? I assume PHP and Javascript will be …

Member Avatar
Member Avatar
+1 forum 3

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 with web sockets. Some clients didn't want a simple chat with their client but instead a full live eShop where they could negotiate the prices of a product or even start a discussion with a visitor. The solution would be implementing web sockets in to our framework and that worked …

Member Avatar
Member Avatar
+0 forum 6

Hello everyone. I have recently downloaded a free bootstrap website and amended the code to fit my requirements. Check it out here: http://www.kougavisitor.co.za The website renders right on various size screens but seems to break on mobile divices. I am looking for help to fix the code for mobile rendering. Anyone available to point me in the right direction? Regards

Member Avatar
Member Avatar
+0 forum 2

Hello All. I am new to Daniweb. I was wondersing if there are people who could help me with CouchCMS, a PHP based content management system. I am held up in an issue where I want to generate the receipts of fees being paid by the students. So by perspective of CouchCMS I have the following: 1. Student template (clonable page to store all students data) 2. Month & Fees template (clonable page to specify the respective month and its fees) 3. A Collect Fees template (for generating fees receipt using the data from Student and Month & Fees templates) …

Member Avatar
Member Avatar
+0 forum 1

whats the coding of combo box in php????????? can any one tell meplzzzzzz

Member Avatar
Member Avatar
-1 forum 15

Hello good people, I am having an issue with including subreports, lists and table datasets in the main report using jasper reports since i want to include two separate sql queries in my report. I am using the same connection to my database for both the main report and the other dataset. The problem is that when i preview the report using the iReport designer it shows everything i want to see, but when i use the php-jasper library in my php script to call the .jrxml file and output a pdf it does not show the sub-report, lists or …

Member Avatar
Member Avatar
+3 forum 3

if its possible please give me instructions Thank you in advance

Member Avatar
Member Avatar
+0 forum 7

Hello, we have a website which I believe is in PHP, and it has a store on it. Adding products to the store etc is easy, but we want to change the text on the website, like add an introduction on the front page. When I try to open the index.php file in Firstpage all I get is a load of code that makes no sense to me. Is there an easy way of doing it, or a program that makes it easy to edit? Thanks for any help.

Member Avatar
Member Avatar
+0 forum 17

I have Apache and PHP installed on my computer. I have an index.php file in my htdocs folder. When I call localhost I get the contents of my htdocs folder in an Index of / page. However if I type localhost/index.php the page loads OK. In my httpd.conf file DirectoryIndex is set to index php and index.html. Can anyone see why this is happening? Thanks,

Member Avatar
Member Avatar
+0 forum 6

Hi, I've been doing research on a career in coding/programming and now I'm very interested and motivated to learn it. I'm a complete beginner and limited financially at present. So I'm confused as to how to go about it. I love reading a lot and sitting on my laptop, so no problem with studying. I'm the type of person that likes to learn an important big wide subject in stages. To first get a decent background and understanding of it. Then to go deeper into it. Is the following way a good way to go about it? Go through books …

Member Avatar
Member Avatar
+1 forum 4

I have a table called download_manager .It has two columns filename and downloads .What I want to do is to get file name and its download count and display them inside ul element. I am able to get file names but I cant display the download count I'm getting undefined index error.This is my code <?php $handle = opendir($directory) or die('Error'); $files = array(); while ($file = readdir($handle)) { if ($file[0] == '.') { continue; } $files[] = $file; } sort($files, SORT_STRING); $query = 'select * from download_manager'; $data = mysqli_query($link, $query); $fileInfo[] = array(); if (mysqli_num_rows($data)) { while ($singleFile …

Member Avatar
Member Avatar
+0 forum 2

When I run script I get error Fatal error: Uncaught Error: Call to a member function prepare() on string in /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php:21 Stack trace: #0 /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php(40): User->emailExists('user1@gmail.com') #1 /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php(102): User->createUserAccount('userr', 'user1@gmail.com', '123456789', 'Admin') #2 {main} thrown in /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php on line 21 Please have a look in code and help me find out error. <?php ini_set("display_errors", 1); error_reporting(E_ALL); class User { private $con; function __construct() { include_once("../database/db.php"); $db = new Database(); $this->con = $db->connect(); // if ($this->con) { // echo "COnnected"; // } } // Check user private function emailExists($email) { $pre_stmt=$this->con->prepare("SELECT id FROM user WHERE email = ? "); $pre_stmt->bind_param("s", $email); …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone! I'm new here and I really need some helps regarding my php coding. I'm trying to do an Update page and the error keeps popping out "Undefined adminid". I've been trying to fix it but to no avail. Can you help me? //my database connection <?php $host = "localhost"; $user = "root"; $password = ""; $db = "eat"; $conn= mysqli_connect($host,$user,$password, $db); mysqli_select_db($conn, $db); session_start(); ?> //my AdminSetting.php <?php include('dbconnection.php'); $id=$_GET['aid']; $query = mysqli_query($conn,"select * from admin"); $row = mysqli_fetch_assoc($query); ?> <fieldset class="account-box"> <?php $status = ""; if(isset($_POST['new']) && $_POST['new']==1) { $id=$_REQUEST['adminid']; $name =$_REQUEST['name']; $email =$_REQUEST['email']; $phone = $_REQUEST['phone']; …

Member Avatar
Member Avatar
+0 forum 1

Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while I choosing a **Time** **value** this value must be send for these useres that **absence** row the checkbox is **checked** this is my code:

Member Avatar
Member Avatar
+0 forum 3

I am using `passport` in `laravel` for authenticating my users in APIs. I am able to authenticate different types of users from different tables and generating different token for them but the routes are not protected. For example. A user can access the routes like this Route::group(['middleware' => 'auth:api'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-list','API\v1\SellersController@index'); }); }); and A doctor can access the routes like Route::group(['middleware' => 'auth:sellers'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-detail','API\v1\TestController@getDetails'); }); }); but this `middleware` check doesn't seem to be working as I can access all the routes …

Member Avatar
Member Avatar
+0 forum 2

Hi I am trying to create a login page from my existing Wordpress Database with custom php file. can any one please help me.

Member Avatar
Member Avatar
+0 forum 3

Hello there, > colud you please tell me that how can i generate html into csv, actually it display all tr and td into csv file, here i have share my code <?php /*include("wp-config.php"); include("wp-app.php"); include("wp-active.php"); include("wp-settings.php");*/ //include("index.php"); include("wp-load.php"); include("wp-includes/template-loader.php"); header ("Expires: Mon, 12 Aug 1988 23:30:00 GMT"); header ("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT"); header ("Pragma: no-cache"); header ("Content-type: text/csv; charset=UTF-8"); header ("Content-Disposition: attachment; filename=report.csv"); header ("Content-Description: Generated Report" ); /* wordpress $wpdb->hide_errors(); @set_time_limit(0); @ob_clean(); header( 'Content-Type: text/csv; charset=UTF-8' ); header( 'Content-Disposition: attachment; filename=woocommerce-product-export.csv' ); header( 'Pragma: no-cache' ); header( 'Expires: 0' ); $fp = …

Member Avatar
Member Avatar
+0 forum 7

using the following code i get an error from line 5 my error is Fatal error: Uncaught PDOException: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php:5 Stack trace: #0 C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php(5): ->('sqlsrv:Server=F...', 'LocalAdmin', 'CrispyCrackers') #1 {main} thrown in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php on line 5 any ideas please it used to work before i moved my database to a new server <?php include("sqlcalendar.php"); $db = new PDO("sqlsrv:Server=FFP-X3DB\X3;Database=FFP_WebServices", "LocalAdmin", "CrispyCrackers"); $row=$db->prepare("FFP_WebServices.dbo.WEBSERV_PERIOD_ANNUAL_FIGURES_CUMMULATIVE_SELECT"); $row->execute();//execute the query //create the array $json_data['cols'] = array( array('label' => 'Mon', 'type' => 'string'), array('label' => 'COrdersTP', 'type' => 'number'), array('label' …

Member Avatar
Member Avatar
+0 forum 2

The following code is erroring on the connection string line 5 it used to work but then i had to move the sql server to another box and now it fails have i forgotten to do something on the sql server or is there error in my code my error is Fatal error: Uncaught PDOException: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php:5 Stack trace: #0 C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php(5): ->('sqlsrv:Server=F...', 'LocalAdmin', 'CrispyCrackers') #1 {main} thrown in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php on line 5 <?php include("sqlcalendar.php"); $db = new PDO("sqlsrv:Server=FFP-X3DB\X3;Database=FFP_WebServices", "LocalAdmin", "CrispyCrackers"); $row=$db->prepare("FFP_WebServices.dbo.WEBSERV_PERIOD_ANNUAL_FIGURES_CUMMULATIVE_SELECT"); $row->execute();//execute …

Member Avatar
+0 forum 0

Hi, I am trying to hide Div ads from specific page( 404, Etc). website url: https://ytdl.us/ And for an example 404 page: https://ytdl.us/search/fvl-fdslkvnfalkjfnvlkfev Here <div class="ads ads-header"> </div> needs to be blocked as it is against TOS. Can anyone help. PS: I am no expert in coding :(

Member Avatar
Member Avatar
+0 forum 2

I want to create a php function that i can use to get a particular user details and display the info gotten in my ProfileActivity when a user profile is been clicked in my app. so i wrote this php code to get user details from my database but when i run the code nothing is returned in my browser. please what could be causing this? <?php require("config.php"); function getdetails($id) { $array = array(); $q = mysql_query("SELECT * FROM 'users' WHERE 'id'=".$id); while($r = mysql_fetch_assoc($q)) { $array['id'] = $r['id']; $array['name'] = $r['name']; } return $array; } function getId($name) { $q …

Member Avatar
Member Avatar
+0 forum 2

i have 2 tables office1 > id,off1 office2 > id,off2_id,off2 i want to insert the choosen into table "saveoffice" > offices1,offices2 drop.php <!DOCTYPE html> <html dir="rtl" lang="ar"> <head> <meta charset="utf-8"> <title>dependent dropdown list using jquery Ajax?</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="http://demo.itsolutionstuff.com/plugin/bootstrap-3.min.css"> </head> <body> <form action="savedata.php" name="myForm" method="POST"/> <div class="container"> <div class="panel panel-default"> <div class="panel-heading">Select office 1 and get bellow Related office 2</div> <div class="panel-body"> <div class="form-group"> <label for="title">offices 1:</label> <select name="office1" id="office2" class="form-control"> <option value="">--- choose office 1 ---</option> <?php require('config.php'); $sql = "SELECT * FROM office1"; $result = $con->query($sql); while($row = $result->fetch_assoc()){ echo "<option value='".$row['id']."'>".$row['off1']."</option>"; } ?> …

Member Avatar
Member Avatar
+0 forum 2

Hi Everyone, I am new to using cURL I have a client website I am working on... They have a password script that automatically creates a new password - what they would like to do now is automatically log the user in - using the automatic password and the users email address. The password script is working perfectly and I have the email & password variables available - $moefEmail & $moefPassword I just need help with editing the two cURL scripts to automatically log the user in I have found the following two articles that detail the process, But I …

Member Avatar
+0 forum 0

I am required to download different type of files from a spesicif folder using ajax .The problem is that when execute the code I get this message [this](https://ibb.co/eaXpGz) I have looked for the similar tutorials I coundnt find a solution Could you please help This my index.php file <!DOCTYPE html> <html> <head> </head> <body> <div class="table-responsive"> <div id="data"></div> </div> </body> </html> <script> $(function(){ fetchData(); function fetchData(){ $.ajax({ url:"ajax.php", method:"post", success:function(data){ $('#data').html(data); } }) } $(document).on('click','.download',function(e){ e.preventDefault(); var fileName=$(this).attr("id"); $.ajax({ url:"download.php", method:"post", data:{fileName:fileName}, success:function(e){ alert(e); } }) }); }) this my ajax.php file that I am using populate the file Information …

Member Avatar
Member Avatar
+0 forum 2

<?php $msg=""; $image1=""; $image1_err=""; //if upload button is pressed if(isset($_POST['upload'])){ $target="images/".basename($_FILES['image']['name']); $db=mysqli_connect("localhost","root","","categories"); $image=$_FILES['image']['name']; $text=$_POST['text']; if(isset($_POST['electro'])){ $sql="INSERT INTO electronic(image,text) VALUES ('$image','$text')"; mysqli_query($db,$sql); } //move image to a file if(move_uploaded_file($_FILES['image']['tmp_name'],$target)){ $msg="Image uploaded successfully"; }else{ $msg="There was a problem uploading image"; } } ?> <!DOCTYPE html> <html> <head> <title>Image Upload</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="content"> <?php $db=mysqli_connect("localhost","root","","categories"); $sql="SELECT * FROM electronic"; $result=mysqli_query($db,$sql); while($row =mysqli_fetch_array($result)){ echo "<div id='img_div'>"; echo "<img src='images/".$row['image']."'>"; echo "<p>" .$row['text']."</p>"; echo "</div>"; } ?>

Member Avatar
Member Avatar
+0 forum 4

The End.