39,320 Topics

Member Avatar for
Member Avatar for Kamal_6

getting error "Parse error: syntax error, unexpected '$physics' (T_VARIABLE), expecting function (T_FUNCTION) in C:\xampp\htdocs\bookclass.php on line 19"need help pls help me out. <?php class Books{ /* Member variables */ public $price; public $title; /* Member functions */ function setPrice($par){ $this->price = $par; } function getPrice(){ echo $this->price ."<br/>"; } function …

Member Avatar for Gideon_1
0
370
Member Avatar for Kamal_6

i am geting the error "Parse error: syntax error, unexpected '$physics' (T_VARIABLE), expecting function (T_FUNCTION) in C:\xampp\htdocs\bookclass.php on line 19" can't figure out.need help .. <?php class Books{ /* Member variables */ public $price; public $title; /* Member functions */ function setPrice($par){ $this->price = $par; } function getPrice(){ echo $this->price …

Member Avatar for jkon
0
106
Member Avatar for Niloofar24
Member Avatar for Mushfik

<?php $this->user_id = $_SESSION['user_id']=$user->id; //create a database connection mysql_connect("host","user","pass") or die("Error:".mysqlerror()); //select database mysql_select_db("db"); ?> <html> <body> <link href="tab.css" rel="stylesheet" type="text/css" media="all" /> <table id="box-table-b"> <tr> <th>User ID</th> <th>Status</th> <th>I.P</th> <th>Offer Id</th> </tr> <?php $result = mysql_query("SELECT * FROM clicks where userId='$id'"); //return the array and loop through each row …

Member Avatar for Gideon_1
0
7K
Member Avatar for paulo.guedes1992

Hi, I'm trying to upload an image but ir gives me error on 'move_upload_file'. > Warning: move_uploaded_file(http://localhost/administrador/images/projects/54031d9e94d63a24dba816ddacbf315e.jpg): failed to open stream: HTTP wrapper does not support writeable connections in C:\wamp\www\administrador\includes\uploadImage.php on line 38 > Warning: move_uploaded_file(): Unable to move 'C:\wamp\tmp\php5E59.tmp' to 'http://localhost/administrador/images/projects/54031d9e94d63a24dba816ddacbf315e.jpg' in C:\wamp\www\administrador\includes\uploadImage.php on line 38 This is my …

Member Avatar for pritaeas
0
858
Member Avatar for StuntHacks

Hey everybody, I'd like to get some specific, but not all rows of a MySQL DB into an array, like those I get if I use mysql_fetch_array(). But feth_array, fetch_row, fetch_object, etc... just returns one row. There are many search functions in the internet, so it must be possible. I …

Member Avatar for Gideon_1
0
391
Member Avatar for Vivek_13

function getRandomNode($file, $numOfQue) { $xml = simplexml_load_file($file); foreach($xml->main as $main) { //Here I want to Get Ramdom Node using $numOfQue. //$numOfQue is a random node Number } $xml->asXml($file); } guys Help me...

Member Avatar for Vivek_13
0
267
Member Avatar for UK-1991

Hello, I created a query insert query everything is in right order but dont know whyy its not working function submit_report() { global $connection; if(isset($_POST["submit"])) { $id = 215; $name = "myname"; $uname = "myusername"; $date = $_POST['date']; $campaign = $_POST['campaign']; $t_leads = $_POST['t_leads']; $c_leads = $_POST['c_leads']; $open_acc = $_POST['open_acc']; …

Member Avatar for UK-1991
0
288
Member Avatar for blueguy777

how to put `where clause variable $didno` in following code: $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT * FROM misscall WHERE did_no = ?"; $q = $pdo->query($sql); $mobile1 = array(); while ($mobi1 = $q->fetchColumn()) { $mobile1[] = $mobi1; } $mobile1list = join(",", $mobile1); Database::disconnect(); thanks in advance

Member Avatar for diafol
0
568
Member Avatar for vatsal_1

Hi, Good day. We need to integrate a net banking API for a Us based website. from that website, Us based users can checkout using net banking option (Pay from their Us bank account). So there will be three options to checkout. 1) pay via credit card (done) 2) pay …

Member Avatar for TexWiller
0
137
Member Avatar for saadi06

HI, I am using tcpdf to generate to pdf files in my system. I am using iframe to display the pdf file to the users. I am able to copy paste the content of the pdf in all other browsers except Internet Explorer. Is there any way I can resolve …

Member Avatar for diafol
0
93
Member Avatar for Ventech_IT

Hi guys i have simple problem that i can't seem to solve and has been frustrating me for some time i am a newbie when it comes to Codeigniter so be kind hahah, okay so on to my problem i have form validation on a subscription form that seems to …

Member Avatar for lorenzoDAlipio
0
390
Member Avatar for rpv_sen

Hi I am trying to read the datas from mysql using php in json. but i am not getting my expected output. Please help me to fix the issue. **code** <?php include('../config.php'); //mysql_query("SET NAMES 'utf8'"); $tdate = date('d-m-Y'); $url = 'url'; $sql = "SELECT * FROM pimage where date<='$tdate' and …

Member Avatar for rpv_sen
0
3K
Member Avatar for Trabelsi

Hi, i am developping an application with php wich contains a checkbox list, i used Editor-PHP-1.4.2 for dataTables wich includes PHP libraries for editor and it worked well but now this version has expired and i can't buy it, if anyone can help me to find a similar library and …

Member Avatar for pritaeas
0
847
Member Avatar for anil14353

I'm trying to implementing faceted search in a Jewellery store, but failed. Problem is when try to filter the attributes table. structure is as follows: Products Table: Id Product_Code Product_Name 1 ABCGOLD1GM 1 gm Gold 2 ABCGOLD2GM 2 gm Gold 3 ABCGOLD394 3.94 gm Gold Attributes Table: Id Attr_Name Alias …

Member Avatar for diafol
0
770
Member Avatar for naazer.hussain

I am getting this "Notice: Undefined index: id" error message for my login system. I have tried several things to fix this but i have had no luck, i have used the most obvious solution, the isset function but i have had no luck. Please help. This is the error …

Member Avatar for bugz313
0
792
Member Avatar for Thevenin

Hi all, I have a problem, I need to automatically get the user latitude and longitude, on page load (no user interaction), is there a way? In my PHP script, I want to populate automatically $lat and $long, everything on page load, so no user intereaction, but I do not …

Member Avatar for chrishea
0
137
Member Avatar for xathlon2

I am using hostip.info API to display country flags for IP's. What I would like to do is when a user hovers over the flag it will display the country name. Has anyone have an idea on how to do this?

Member Avatar for cereal
0
62
Member Avatar for wareez

I have this code in my login.php, from sigin.php page if the user click on signin, it will display wrong username or password but the username and password is in the database named Username and Password. Please i will appreciate if someone can fix this error for me. Your concern …

Member Avatar for wareez
0
2K
Member Avatar for Niloofar24

Hello. This is a part of my script: <table id="table-5"> <thead> <th>ID</th> <th>URL</th> <th>Editor</th> <td>More....</td> </thead> <tbody> <?php include('connection.php'); try { $sql = "SELECT * FROM Data ORDER BY ID DESC"; $result = $conn->query($sql); foreach($result as $key => $row) { echo "<tr>"; echo "<td>" . $row['ID'] . "</td>"; echo "<td>" …

Member Avatar for Niloofar24
0
434
Member Avatar for Niloofar24

Hello everybody. There is a row in my db table I have set it's type as "TIMESTAMP". How should I fill in? Should get the current timestamp in php and send it to that row, correct? So how can I do that?

Member Avatar for Niloofar24
0
439
Member Avatar for UK-1991

Hello I have created an attendance system but client requested to include a new fucntion iin it. Like there if employe comes and time in after the set time its should count late for that day means on a table if it is late so it will show 1 and …

Member Avatar for UK-1991
1
733
Member Avatar for infoitmanoj

Here is my Php script redirect into admin page ...this code working fine in localhost but i will go the server is not redirected i dont know ehy its happening right now ... any help guys... if ($this->session->userdata('admin_login') == 1) redirect(base_url() . 'index.php?admin/dashboard', 'refresh');

Member Avatar for infoitmanoj
0
1K
Member Avatar for chineerat

I have a large MYSQL / PHP in a while loop report being run and in many cases the report times out due to the large amount of data being calculated. Is there a way to make have a div displaying "Processing" when the while loops is calculating and if …

Member Avatar for bugz313
0
378
Member Avatar for infoitmanoj

my php code working fine in localhost ...but i have uploaded on server my php administratr login page only validated but not redirect to admin page system browser says error occured ...but other users login page is working fine ...wat can i do >>> wats actually problem ??

Member Avatar for jkon
0
330
Member Avatar for network18

Hi, I have created a test procedure (for the sake of example to get this working) called test_proc like below - DELIMITER $$ CREATE DEFINER=`tloken`@`%` PROCEDURE `test_proc`(In user_id varchar(100), OUT message varchar(1000)) BEGIN set message ='OK'; END and calling it from php test page like below - $sso = $_GET['sso']; …

Member Avatar for cereal
0
4K
Member Avatar for phoenix254

Hi everyone, my code is here [Click Here](http://codepen.io/anon/pen/XbdBLm) How i can get value of php variable in javascript, i have an div id=windowhead where i want to show username which i clicked <a class='users' href='#' >test</span></a> <a class='users' href='#' >test2</span></a> <a class='users' href='#' >Max</span></a> <a class='users' href='#' >John</span></a> <div id="warp"> …

Member Avatar for Aeonix
0
250
Member Avatar for rpv_sen

Hi I have written a json file using php. But i am unable to display the css style. can any please help me to fix the issue. **my json code** <?php require_once('config.php'); function jde_date_conv($jde_date) { $ct = substr($jde_date,0,1); $yr = substr($jde_date,1,2); $dy = substr($jde_date,3,3); if($ct == 0)$yr_pfx=19; if($ct == 1)$yr_pfx=20; …

Member Avatar for rpv_sen
0
518
Member Avatar for Raadha

my php code is working and is giving an output.. but the pie chart (html part) is not working.. can anyone help me solve this?? <?php $con=mysqli_connect("localhost","root","","test"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } if(isset($_POST['pie1'])) { $to= $_POST['to']; $from= $_POST['from']; $query = mysqli_query($con,"SELECT COUNT(mrd),del …

Member Avatar for Raadha
0
277
Member Avatar for ramsiva

I am getting response as standard id in my project & i need to pass this value to php variable any body help me. My PHP page <div class="checkbox check-success"> <?php $b=mysql_query("select * from standard_names ")or die(mysql_error()); $count = mysql_num_rows($b); $i = 0; $breakafter=5; ?><?php while($row = mysql_fetch_array($b)) { $i++; …

Member Avatar for diafol
0
9K

The End.