39,320 Topics
| |
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 … | |
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 … | |
Hello. How can i get the html tags and texts of a web page in php? | |
<?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 … | |
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 … | |
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 … | |
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... | |
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']; … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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>" … | |
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? | |
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 … | |
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'); | |
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 … | |
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 ?? | |
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']; … | |
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"> … | |
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; … | |
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 … | |
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++; … |
The End.