39,326 Topics

Member Avatar for
Member Avatar for Indians

<form action="searchdetail.php" method="post"> SEARCH BY: <select name="searchby"> <option value="gname">Guest Name</option> <option value="city">Guest City</option> </select> <input name="query" type="text" /> <input name="subval" type="submit" value="Search" /> </form> and searchdetail.php include("config.php"); if(isset($_POST['subval'])) { $query = mysql_real_escape_string(trim($_POST['query'])); $sql = mysql_query ("SELECT * FROM voucher WHERE gname = '$query'"); echo "<table border=1 width=860 align=center cellsapcing=5 cellpadding=5>"; …

Member Avatar for Indians
0
285
Member Avatar for rahia307

Hi every one, I am using this funtion function get_last_inserted_id($table) { include "dbsetting/adm_vars_config.php"; include "dbsetting/classdbconection.php"; $dbacosis = new dbacosis(); $sqlacosis = $dbacosis->queryacosis("SELECT LAST_INSERT_ID() AS `last_id` FROM `pcosis_courses`;"); if(!$sqlacosis or mysql_num_rows($sqlacosis) == 0) { return false; } else { $data = mysql_fetch_array($sqlacosis); return $data['last_id']; } } $id = get_last_inserted_id("courses"); echo $id; …

Member Avatar for diafol
0
119
Member Avatar for bodylove121

<?php $input = $_GET['input'];//Note to self $input in the name of the search $terms = explode(" ", $input); $query = "SELECT * FROM `#####` WHERE 1 LIMIT 0 , 30"; foreach ($terms as $each){ $i++; if ($i == 1) $query .= "keywords LIKE '%$each%' "; else $query .= "OR keywords …

Member Avatar for pardeepkk
0
293
Member Avatar for nacedo

I am using Formidalbe Pro on my wordpress site. Users are sending me a form that I make editable by them and by me (Its all managed by Formidable). They have to be logged-in with wordpress to fill the form and edit it. No anonymous access. I want to encrypt …

Member Avatar for diafol
0
271
Member Avatar for Indians

here i am store the dynamic row values into mysql. i am using jquery and javascript for dynamic rows and auto calculation and then stored to mysql using php coding. that works perfectly. i already added dynamic row value into mysql perfectly. But, now i want to edit the table …

Member Avatar for Indians
0
1K
Member Avatar for Izzah_1

i want to insert new data but the data didnt show up in database and didnt display for user when i click foe change theres nothing happend i couldnt find any error...ples help me (BookingnDisplay.php) <h1><?php if($_SESSION["name"]) { ?> Welcome <?php echo $_SESSION["name"]; ?>. Click here to <a href="logout.php" tite="Logout">Logout</a>. …

Member Avatar for ehpratah
0
211
Member Avatar for davy_yg

Hello, This script has error: Warning: opendir(E:/xampp/xampp/htdocs/images/uploads/) [function.opendir]: failed to open dir: Invalid argument in E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php on line 17 Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php:17) in E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php on line 79 You won't see this. Why is it? upload_process.php <?php require_once("config_tinybrowser.php"); require_once("fns_tinybrowser.php"); // …

Member Avatar for davy_yg
0
208
Member Avatar for Djmann1013

I am trying to remove spaces in the names of file uploads, but the below code does nothing. <?php session_start(); mysql_connect('localhost','root','') or die(mysql_error()); mysql_select_db('db'); if(!isset($_SESSION['username']) && !isset($_SESSION['auth'])){ header('Location: /'); } $username = $_SESSION['username']; echo $username; $dirs = mysql_query("SELECT * FROM `users` WHERE `usr_name` = '" . $username . "'") or …

Member Avatar for Djmann1013
0
363
Member Avatar for dean.ong.14

Notice: Undefined index: username in C:\Users\User\l\htdocs\register.php on line 12 Notice: Undefined index: password in C:\Users\User\l\htdocs\register.php on line 13 <html> <body> <?php $connect=mysql_connect("localhost","root",""); $db_selected = mysql_select_db("users", $connect); if(isset($_POST['register'])){ $username = $_POST['username']; $password = $_POST['password']; if(!$username || !$password){ echo "One of the fields are empty"; }else{ $find_multiple=" SELECT username FROM resgistration WHERE …

0
100
Member Avatar for tqmd1

Dear Sir, I have following codes. These code wok fine. Is it possible to get table data with ajax. If yes then please help me to modify my code. Thanks <?php require_once("connect.php"); $productCode = ""; $productValue=""; if(isset($_POST['button1'])) { // Get values from form $sno =$_POST['txtsno']; $record_check ="SELECT * FROM test …

Member Avatar for diafol
0
269
Member Avatar for nadiam

Hey guys, yes my problem is very, very trivial and im sure it does not rank importance to be posted but im really frustrated. See my coding was fine as in it executed as i wanted it to and now i dont know why but it isn't and i have …

Member Avatar for diafol
0
296
Member Avatar for urbanthistleuk

Hello All, Having a few problems with the code below and wondered if someone could shed some light on it, I have a php script running from a cron that runs every 15 mins the error I am getting tom the cron is `PHP Notice: Undefined variable: rows in /var/www/vhosts/server.com/migration_tracker/staff/5th_email.php …

Member Avatar for urbanthistleuk
0
283
Member Avatar for Violet_82

Hi guys, I have an HTML page that I built and at the moment the content on it gets changed via javascript. What I would like to achieve is to change the content permanently on this page (which will be uploaded to the server). Now, I must admit that I …

Member Avatar for Violet_82
0
1K
Member Avatar for davidjennings

Hi All, I am trying to add insert/update and delete to an OOP singleton database connection using public functions like this, not sure if it is correct? example code public function insert($sql){ if($this->_execute= $this->_mysqli->_execute($sql)){ while ($row = $this->_execute->fetch_object()){ $this->_results[] = $row; } $this->_count = $this->_execute->num_rows; } return $this; } //page …

Member Avatar for diafol
0
241
Member Avatar for justin22

Table structure for table `address` -- CREATE TABLE IF NOT EXISTS `address` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `country` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `address` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `address` …

Member Avatar for pritaeas
0
137
Member Avatar for AARTI SHRIVAS

<?php $con=mysqli_connect('localhost','root','password','swati'); $sql1="SELECT * FROM `country`"; ?> <html> <head> <script> function val() { var name=document.getElementById("name").value; var add=document.getElementById("add").value; var email=document.getElementById("email").value; var chk1=document.getElementById("c1").checked; //var chk2=document.getElementById("c").checked; //var chk3=document.getElementById("c3").checked; //var gen=document.getElementById("gender").checked; var gen1=document.getElementById("gender1").checked; if(name=="" || name==null) { alert("name can not be blank"); return false; } if(add=="" || add==null) { alert("address can not be blank"); …

Member Avatar for eyasin
0
240
Member Avatar for zeeshan_kust

i have retrieved mysql data from one table in json using the following script [CODE]$table_first = 'abc'; $query = "SELECT * FROM $table_first"; $resouter = mysql_query($query, $conn); $set = array(); $total_records = mysql_numrows($resouter); if($total_records >= 1){ while ($link = mysql_fetch_array($resouter, MYSQL_ASSOC)){ $set[] = $link; } } echo json_encode($set);[/CODE] how can …

Member Avatar for anson davis
0
690
Member Avatar for nadiam

So i have this web page to book a studio and on the page there are two tables. one table is a form to book the studio(time,date,etc) and the other table i plan to display other data that is already in the database. the thing is in the second table …

Member Avatar for diafol
0
201
Member Avatar for feblioz

I tried running this code <form action = "upload.php" method="POST enctype="multipart/form-data"> <input type="file" name="file"><BR><BR> <input type="submit" name = "Submit" value ="Submit"> </form> <?php echo $name = $_FILES['file']['name']; $size = $_FILES['file']['size']; $type = $_FILES['file']['type']; $tmp_name = $_FILES['file']['tmp_name']; ?> but im having these errors Notice: Undefined index: file in C:\xampp\htdocs\series\fileupload\upload.php on line …

Member Avatar for amindabj
0
439
Member Avatar for Iikeloa

Hi can any one give the idea of the pagination system ? I mean thea functions that I should use to get a good pagination system.What I reached so far is this : I should request the number of rows from the database.Then I should make a variable which contains …

Member Avatar for pritaeas
0
165
Member Avatar for NA7KR

How do I start with the drop down list disabled? <head> <script type="text/javascript"> function makeDisable() { var x=document.getElementById("mySelect") x.disabled=true } function makeEnable() { var x=document.getElementById("mySelect") x.disabled=false } </script> </head> <body> <select id="mySelect"> <option>Apple</option> <option>Banana</option> <option>Orange</option> </select> <br /> <input type='radio' name='campustype' value='in' onclick="makeDisable()" checked='1' /><label for='incampus'>In-campus</label><br /> <input type='radio' name='campustype' …

Member Avatar for NA7KR
0
281
Member Avatar for Indians

edit.php coding... <?php $uid = (int)$_GET['id']; ?> <form action="update.php" name="myform" method="post" onsubmit="return(validateform());"> <input type="hidden" name="edited" value="<?=$uid;?>"> <?php $tariff_query = mysql_query("SELECT * FROM ebvouchertariffs WHERE VoucherID_Fk = $uid"); if(mysql_num_rows($tariff_query)>=1) { echo "<table width=960 align=center cellspacing=0 cellpadding=0> <tr> <td width=68 height=50 class=tabtext>SL.NO</td> <td width=106 class=tabtext>DATE</td> <td width=204 class=tabtext>PARTICULARS</td> <td width=117 class=tabtext>NO OF …

Member Avatar for Iikeloa
0
374
Member Avatar for Pravesh_1

I have website for audio and videos. My problem is that an audio is not running on Server but working on local. I created a folder where only html files are there and it is working fine on that folder. But an another folder where are audios and videos are …

Member Avatar for Pravesh_1
0
190
Member Avatar for davy_yg

[CODE] <link href="gradient.css" rel="stylesheet" type="text/css"> <?php //mysql_connect("localhost","root",""); //mysql_select_db("pintar"); include "includes/koneksi.php"; //echo "<table align=center><tr><th>No</th><th>Nama</th><th>Alamat</th></tr>"; // Langkah 1: Tentukan batas,cek halaman & posisi data $batas = 3; $halaman = $_GET['halaman']; if(empty($halaman)){ $posisi = 0; $halaman = 1; } else{ $posisi = ($halaman-1) * $batas; } //Langkah 2: Sesuaikan perintah SQL echo "<table>"; …

Member Avatar for Purnomo_1
0
273
Member Avatar for Iikeloa

Hi edit_order.php <?php session_start(); if(!isset($_SESSION['admin'])){ echo "Only the admin can see this page"; header("Refresh: 3;url=login.php"); }else{ require("inc/config.php"); require("inc/header.php"); $id = $_GET['id']; $sql = "SELECT * FROM serv WHERE id=$id"; $query = mysql_query($sql); while($serv = mysql_fetch_object($query)){ $title = $serv->title; $describtion = $serv->describtion; $url = $serv->url; $status = $serv->status; } ?> <center> …

Member Avatar for Iikeloa
0
265
Member Avatar for developer707

Hi to everyone, I am a begginer on php so maybe this question will appear to simple to someone. My issue is that I want to output a list with all .zip files that are in my site directory. Also for each file I want some details for exemple: Filename: …

Member Avatar for developer707
0
276
Member Avatar for Cristianh21

THIS CODE IS TO DISPLAY THE DATA FROM THE DATABASE AFTER THE FORM HAS BEEN SUBMITTED. THE PROBLEM I'M HAVING HERE IS THAT WHEN I SUBMIT THE FORM THE LINK IS NOT WORKING. IT GIVES ME THIS : http://yourweb.com/test2.php?id= INSTEAD OF : http://yourweb.com/test2.php?id=23 HOW CAN I FIX THIS? THANK YOU! …

Member Avatar for Cristianh21
0
258
Member Avatar for erminasrcutp

Hi everyone , below is my update.php code , however , I am seeking for code to update specific user . For example Search Id : _______________________ [search] if user want to search id details for id : 11 the update.php will show open a page that can update that …

Member Avatar for Lsmjudoka
0
319
Member Avatar for daniel.conlinjr.1

I've looked all over and ive not found a good answer, is there a way you can take your functions and make them in seprate files and call them to the class? it seems no one has tried this or i am ooking in the wrong place

Member Avatar for diafol
0
360
Member Avatar for MattD00

I have created a multipage form which collects data input by the user before and is then sent by email. I have created a table that the user has to fill in an ammount for each item. They user doesn't have to fill everything in only the items that apply. …

Member Avatar for diafol
0
188

The End.