39,323 Topics
| |
is it possible?? $a= 5; $b =10; $c= "+" $d= $a.$b.$c; How can I do dynamic calculation like this. I know this code will not work. But Just want to use opereater directly input through form. How can I prevent opreater to converting into string. | |
<?php include 'functions.php'; if(!loggedin()) { header("Location: index.html"); exit(); } $session = $_SESSION['empno']; $dbName = mysql_query("SELECT ename FROM employee WHERE empno = '$session'") or die(mysql_error()); $nameResult = mysql_fetch_array($dbName); $name = $nameResult['ename']; $reqno = $_GET['id']; //echo $reqno; exit; $amtApproved = $_GET['amtApproved']; $query = mysql_query("SELECT * FROM requisition WHERE reqno = '$reqno'") or … | |
I am new to php, i am creating a website which fetch data from mysql, if the data is more then 10 columns then i want to give a link page 1 , 2 , 3 , 4 (Like google) so user cant navigate through them.... How can i do … | |
Hello Guys , I want to create a script that convert a text file or Nfo file to an image(format is .PNG). What it does is simply load the txt and output it as an image Here is my code: <?php if(isset($_FILES['image'])){ $errors = array(); $allowed_ext = array('txt'); $file_name = … | |
I understand a select list will display the options in which they are received, however I am compiling my select list and options from a number of PHP/mysql queries and am at a lost as to how I could achive the ordering via the php/mysql route. $all_zones=('a,b'); // foreach($all_zones as … | |
Good Morning All, This is a question I touched on previously, but don't think I presented what I really need to do. I need to get this accomplished ASAP, and really have no clue how to go about it. Would even be willing to pay someone else if they have … | |
<?php require_once('mail.inc.php'); $con = mysql_connect("localhost","root","12345"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("billtest",$con); $today=strtotime(date("Y-m-d")); $query1="SELECT * FROM ab_transactions_paypal WHERE status=0 AND expiry_date>$today"; $result=mysql_query($query1); if(mysql_num_rows($result)>0){ $count=mysql_num_rows($result); for($j=0;$j<$count;$j++){ $row=mysql_fetch_array($result); $token_id=$row['token_id']; $account_id=$row['account_id']; $sku=$row["sku"]; $inv_id=$row['invoice_id']; $bill_amt=$row['amount']; $cust_email=$row['cust_email']; $url="https://ssl.3gsecure.net/api/payment/checktoken.asp?TransactionToken=$token_id"; $httpRequest_OBJ = new httpRequest($url, HTTP_METH_POST); $result = $httpRequest_OBJ->send(); $mine=$httpRequest_OBJ->getResponseBody(); echo $httpRequest_OBJ->getResponseBody(); $s = … | |
Hi i am Trying to delete a page from my site cms and something is not working . the code is: <?php $con = mysql_connect("localhost","matanc_cmd","123123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("matanc_cms", $con); $id = (int) $_POST['id']; mysql_query("DELETE FROM content WHERE id='$id'"); mysql_close($con); // if successfully … | |
Hi, I am new to Unix environment. Any one can explain how I can set CRON job to run PHP script. Thanks. | |
I am new to php and I am trying to write the cross tab query for mysql using PHP. I constantly keep getting errors like PHP Parse error: syntax error, unexpected T_STRING in /home/sushvedula/cross.php on line 5 Kindly help. This is my code. <?php $db->Connect('localhost','root','********','pack_00001'); for($i=0;$i<5;$i++) for($j=0;$j<24;$j++) select timestamp, group_concat(if(module=$i … | |
Hi I have had a client asking me to look at the image upload section of the site i have built for them: Here is the upload form code: <form enctype="multipart/form-data" action="processupload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000000000" /> <center>Choose photo to upload: <input name="uploadedfile" type="file" /><br><br> <input type="submit" value="Go to … | |
i create some login form and i put remember me check box below username and password field this is my login form code : <?php error_reporting(0); include "../db.php"; ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <title>IN ADMIN PANEL | Powered by Mahdi Yazdani</title> <link rel="shortcut icon" … | |
Data from a XML sheet is converted to php array and I have tried to create a quiz format question with the below code, but it does't work. Not sure how to get it working for multiple questions... <?php function get_answer($input){ if ($input == ($att['ans']) ) {echo "Correct Answer . … | |
Hello I am getting this error - even if object database is initialized in class that is in database.php and then included in session.php that gives an error. I've tested the thing in another script jok.php that is bellow and it works there. I've already lost 1 day on this … | |
I need a BIG HELP, first I want to say Im REALLY BAD with PHP :D so basically I have a php script witch auto generate list of videos from a folder on my host with 1 media player http://img687.imageshack.us/img687/5915/snap20120703at155809.png - As you can see there are too many clips … | |
Hi! I have small problem, in my add.php is selection tag used to choose year, so in my edit.php has place for year too where i use selection tag too, but how can i show in edit.php that year in selection tag, that what i have choosed in add.php? With … | |
I have a problem, how to display the image and the url stored in the destination database. This my format code : This code is stored in the database like this <a href=\"<?php echo get_settings('home'); ?>\" style=\"border:0;\"> <img src=\"<?php echo get_bloginfo('template_directory');?>/banner/728x90.JPG\" width=\"728\" height=\"90\"/> </a> I called using: stripslashes(get_option("bh")); <a href="<?php … | |
how to create edit form .and update user data my table is; id int auto_increment Name Department Problem Ext_no Ip_Add Remark Email Status (set) My view table code is ;- <?php //connects to database $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("users", $con); //select … | |
Hi I am having trouble understanding how the pre_replace function works. I am using a script which has the following line: $ret = preg_replace("#(@|telefone|e-mail|.com|skype|.com.br|fone|www.|hotmail|yahoo|ig|aol|uol|gmail|bol|msn|MSN)#i", "\\1scriptolutionreplacement", $ret); What is happening is that any word with for example the letters ig or uol in it is getting caught. Is there a way … | |
I use yahoo messenger api for sending bulk chat messages to different groups(which is define by us for different package users ) but after some time JYMSG API automatically sign off How can we stay sign in? <?php error_reporting(0); include("includes/dbconn.php"); function sendreq($mid) { $sql = mysql_query("select * from cv_requests where … | |
Hello, I have to appologize but I am very new to programing and web developemnt. I have developed a web site that will allow users to register and store their info in an database. I am using webmatrix to put it all together. I have no problem adding the info … | |
does anyone knows how to connect php to firebird database is there any tools or just a script i can use to connect . . replies for help are very much appreciated TY . . . | |
Dear experties, I have a problem with read file in format "pptx/docx/xlsx". In other format PHP can read the document properly..what can I do for this case? anybody can help me?? here my script for view the file by hyperlink.. <a href="../folder/upload/<?php echo $row['fileName']; ?>"><?php echo $row['fileName']; ?></a> | |
OK, hours later and much searching yields nothing.... We do newsletters on our website, they are created via a form in the backend. Currently they are generic whatever you enter in the textfield is sent and I was looking to add predefined headers and footers to them that could be … | |
How can I convert the below array to look like a quiz question format: Array ( [content] => Array ( [@attributes] => Array ( [id] => 20 ) [quest] => <FONT FACE="Arial">If K represents kinetic energy, V velocity and T time and these are chosed as the fundamental units then … | |
Hi friends, i have developed a new website.My client needs a online supporting chat feature in the website.I havent tried with it yet.I have downloaded the code and implimented many code in the site.But all are showing errors.Please help me.thanks in advance. | |
Hi, anyone can share some date picker code for me? I'm new to PHP and I saw a lot of free source code in google. Unfortunately I don't know about javascript and they mostly provide javascript date picker source code. Currently I want a php date picker to search a … | |
how do you group by value ? I have it where it selects by drop down... select sum (table) where item group by ?????? VALUE ???? The value I use is select | |
Hi, I have this situation - an user clicks a link in my site. That link sets a session variable and then redirect the user to another page. That another page then redirects the user back to the previous page, but the previously set session variable is gone. How to … | |
Hi, I am using tcpdf library to create pdf files and they are password protected.Now I have a condition where I want to merge different pdf files and create a single pdf file and dipslay the multiple pdf files to the user in a single pdf file.I am having problem … |
The End.