39,388 Topics

Member Avatar for
Member Avatar for shahai.ali

hi i have a following form in html: `<form action="upload_file.php" method="post" enctype="multipart/form-data"> File Name: <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form>` and here is my `upload_file.php` if (($_FILES["file"]["type"] != "file/XML")) { echo "Invalid file type"; } else { echo 'file is uploaded'; } it …

Member Avatar for Robert1995
0
287
Member Avatar for vizz

Here is my code <?php $url="http://www.google.co.in"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); echo $result; ?> When I try to display webpage in div it goes full page. I want to display it only in div which I want. It is not getting code from it's original css …

Member Avatar for vizz
0
2K
Member Avatar for xbat

I have a simple math problem.. But what I would like to do is not have zero display if it equals out to zero... `<? echo $_POST['x'] * $_POST['y']?>` If this equals anything below zero I do not want the number to display.

Member Avatar for xbat
0
141
Member Avatar for hwoarang69

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 66 line 66: $productCount= mysql_num_rows($sql); //count the output amount <?php //block grab the whole list for viewing $product_list = ""; $sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC"); $productCount= mysql_num_rows($sql); //count the output amount …

Member Avatar for LastMitch
0
97
Member Avatar for tapuwa2002

I have script that using to ssh2 to log into the firewall. I would like to run the commands from the firewall as if I was in the terminal when I add in the command in my script I get Resource id #5. <?php $connection = ssh2_connect('192.168.2.5', 22); ssh2_auth_password($connection, $user, …

Member Avatar for LastMitch
0
1K
Member Avatar for dancks

Based off some stuff from my last thread I tried to write a search results page using maximum 3 parameters. I used a couple of function to try and get everything organized. One: sort_mysql_results has no defined parameters so I can put in as many parameters as needed. The code …

Member Avatar for dancks
0
331
Member Avatar for jewelraz

Hello, After long time I am visiting this forum. I am very busy with my new job and don't find much time to contribute in forums. I really missed this forum. I have several blogs with wordpress and I think its time for me to learn Joomla. So, I am …

Member Avatar for LastMitch
0
559
Member Avatar for mpc123

Hi I have to echo out some fields but "field 1" "field 2" "field 3" has a numeric value. I need to divide field 1 by field 2 and then take that result off of field 3 and echo that result. The code is part of a table this is …

Member Avatar for mpc123
0
173
Member Avatar for bitejones

Hello I have a database of jobs and I want persons to be able to search using keywords. users will be required to enter these keywords via text field. I am able to display the results if the user enters one search word in the text field however i am …

Member Avatar for adam.adamski.96155
0
206
Member Avatar for vinodpaul

<?php include 'vars.php'; set_time_limit(0); putenv("TZ=Asia/Calcutta"); $conn = mysql_connect($hostname,$username,$pass)Or DIE ("Unable to connect to database"); mysql_select_db($dbname, $conn); global $name,$pass,$userid,$sex,$nam,$password,$flag; $userid = $_REQUEST['userid']; $userid=strtoupper($userid); $password = $_REQUEST['password']; $query = "SELECT name,password,lastlogin FROM binaryusers where userid = '$userid'"; $res = mysql_query($query)or die ("Bad query: " . mysql_error() ); if (mysql_fetch_row($rs)) { global $name, …

Member Avatar for SagarSe7en
0
149
Member Avatar for Sivapatham

I need to generate sequences of games using the round robin algorithm. I have the php page where the user can input the tournament name which will be inserted into the database and it has got a drop down menu up to 32 teams (select number of teams). So if …

Member Avatar for Bomf
0
3K
Member Avatar for hwoarang69

Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\E-COMMERCE\admin\inventory_list.php on line 55 move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname"); what is t_string error? here is almst full full. <?php... $sql = mysql_query("INSERT INTO products (product_name, price, details, category, subcategory, date_added) VALUES('$product_name','$price','$details','$category','subcategory','details', now())")or die("insert error"); $pid = mysql_insert_id(); $newname = "$pid.jpg" move_uploaded_file($_FILES['fileField']['tmp_name'], "../inventory_images/$newname"); ...? <html> .... <form …

Member Avatar for SagarSe7en
0
173
Member Avatar for Goldfinch

Hi, I am building this script to display a daily comic, I am trying to get every day after the start date and up to the present date to turn into a link on the calendar but only those days. The script is more than one file but I believe …

Member Avatar for Goldfinch
0
315
Member Avatar for tibormarias

Dear Sirs! I have this php syntax in my <head>. <?php // MySQL mysql_connect("localhost", "fundis_petrol", "petrol123") or die(mysql_error()); mysql_select_db("fundis_petrol") or die(mysql_error()); // Table $result = mysql_query("SELECT * FROM `fillingstations` LIMIT 0 , 30") or die(mysql_error()); // Print while($row = mysql_fetch_array($result)){ echo $row[2]; } ?> And I also have this JS …

Member Avatar for tibormarias
0
273
Member Avatar for hwoarang69

<?php //if user hit sumbit //check if field are not empty if(isset($_POST["username"]) && isset($_POST["password"])) { $manager = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["username"]]); $password = preg_replace(#[^A-Za-z0-9#i',",$_SESSION["password"]]); include "../storescript/connect_to_mysql.php"; $sql = mysql_query("SELECT id FROM admin WHERE username='$manger' AND password='$password' LIMIT 1"); //make sure person exists in database--- $existCount = mysql_num_rows($sql); //count the row num if($existCount == …

Member Avatar for hwoarang69
0
109
Member Avatar for hwoarang69

<?php session_start(); //if user is not loged in if(!isset($_SESSION["manager"])) { header("location: admin_login.php"); exit(); } //check if user exists in database $managerID = preg_replace('#[^0-9#]i','',$_SESSION["id"]); //decype the id $manager = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["manager"]); $password = preg_replace('#[^A-Za-z0-9]#i','',$_SESSION["password"]); include "../storescripts/connect_to_mysql.php"; $sql = mysql_query("SELECT * FROM admin WHERE id='$managerID' AND username='$manager' AND password='$password' LIMIT 1"); //make sure …

Member Avatar for hwoarang69
0
262
Member Avatar for amras123

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in \xampp\htdocs\proj\demo.php on line 57 Can anyone explain my problem. Thanks! <?php $result = mysql_query("SELECT * FROM internet_shop"); while($row=mysql_fetch_assoc($result)) { echo '<div class="product"><img src="img/products/'.$row['img'].'" alt="'.htmlspecialchars($row['name']).'" width="128" height="128" class="pngfix" /></div>'; } ?>

Member Avatar for deceptikon
0
90
Member Avatar for bsewell

Hi, I've written some code in PHP, which I have tried converting to ASP.NET after looking at some examples. I'm stuck on a form processor, where I'm trying to check if some values have been filled in or not. Basicly I had a few issets() to do this in the …

Member Avatar for bsewell
0
182
Member Avatar for amras123

Is this possible? <li><a href="master.php" class="selected"><span></span>Home</a></li> <li><a href="about.php"><span></span>About</a></li> <li><a href="products"><span></span>Products</a></li>

Member Avatar for pritaeas
0
48
Member Avatar for MGadAllah

hello i've started to study html then will go through css then php and mysql please i'd like to ask for your advise for which editor i should stick to to facilitate my learning way the point is that i'd like to start the right way and stick to it …

Member Avatar for MGadAllah
0
284
Member Avatar for doha786

in my home.php file i hv defined one path as javascript variable like below: <?php $path= "http://localhost/tiffany/" ?> <script type="text/javascript" src="<?php echo $path; ?>js/manuals.js"></script> <script type="text/javascript" > var templateUrl = '<?php echo $path; ?>'; </script> & in my 'manuals.js' file i have included someother js files adding with that variable: …

Member Avatar for doha786
0
265
Member Avatar for nazmule27

php file uploading and save it in database as folder url but save in another project folder. please guide me.

Member Avatar for LastMitch
0
79
Member Avatar for sultankhan

i have the follwing table name email pass name1 email1 pass1 name2 eamil2 pass2 how can i cahnge name1 from my admin page please any one help me

Member Avatar for tscina
0
263
Member Avatar for ratanji

hi i 've to store the images in folder and retrive them, so how can i ? can anyone help me ?

Member Avatar for ratanji
0
106
Member Avatar for tenorjazz

Hi, I'm trying to make a template page for my web site. The main template will include a header section, a main body section and a footer section (not included in sample code). I want to make the header and footer sections separate html pages so I only need to …

Member Avatar for code739
0
217
Member Avatar for mpc123

Hi I am creating some files of which are taken from database fields, the problem is the field in the database has &pound; in which is great as it is needed when in the browser page. The problem I have is when making the file is that it creates the …

Member Avatar for mpc123
0
87
Member Avatar for TINO_

Hi! It's ma first time in this forum,i hope u wll wormly welcome me.I am an undergraduate student in Software Eng. at the University of Dodoma in Tanzania, i would like 2 know if I can develope a **computer alarm** with **PHP**, if not the other languages I h've gon …

Member Avatar for LastMitch
0
83
Member Avatar for eduard.ferrer.71

Hi, In the fg_membersite.php file I would like to get the ['id_user'] variable under the function SendUserWelcomeEmail, so the subscriber will receive the registration number (a kind of ticket)... Can someone help me on how to achieve this? I've been trying changes for months but I get nothing. Many thanks …

Member Avatar for eduard.ferrer.71
0
183
Member Avatar for Riu 2009

hello everyone..i just wanna ask how i can increment the score after each answer given by the user and at last displaying result after questions finish. i want to store the result in database here's my code which is working fine with checking questions and displaying result and then next …

Member Avatar for broj1
0
4K
Member Avatar for GlenRogers

Hi, I'm trying to make my gallery so that it shows a certain number of images then creates more pages. Can anyone help me out on this? This is my gallery file at the minute. gallery.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="../css/thumbnailviewer.css" rel="stylesheet" …

Member Avatar for GlenRogers
0
167

The End.