39,323 Topics

Member Avatar for
Member Avatar for lilwizz770

I created an application locally on my pc using xampp and phpmyadmin, now i want to put the application on my website, but i dont know how to move it from my pc to the web, especially the database and the tables...help urgently needed.

Member Avatar for diafol
0
105
Member Avatar for eNnilla

I'm currently building a website for my friends and me, and I've decided to have the homepage use a news system. I have the page working with PHP to load articles from my MySQL Database, and that's working fine. My real issue is with the page that adds items to …

Member Avatar for broj1
0
305
Member Avatar for albert.sibanda.9

l keep getting this error: Parse error: syntax error, unexpected $end How do l get rid of it.l am preety knew to php so l am still learning,

Member Avatar for LastMitch
0
196
Member Avatar for sandjuks112

Hi! Can somwhone make, or copy here php image upload code, I was searching on internet but found nothing... What I need is that, to upload picture to database, but not blob, and show it in actual link like www.website.com/pictures.php?id= <--and there a number, that shows a picture. And switching …

Member Avatar for diafol
0
218
Member Avatar for tibor.marias

Dear Sirs! I would like to echo out the last iteration of a while loop differently as the first ones. This is my code wich echos out the first and the last iteration, but I need the middle iterations as wel.. <?php // Print if ($row = mysql_fetch_array($result)) { echo …

Member Avatar for diafol
0
150
Member Avatar for shahai.ali

hi every one. i have two tables table_1 ( std_id primary key, std_name, tchr_id foreign key ); table_2 ( tchr_id primary key, tchr_name ); as from the above tables i have the foreign key constraint. it mean if i want to delte teacher id it must be firstly deleted from …

Member Avatar for adam.adamski.96155
0
202
Member Avatar for azzahar

Hi, I am completing a edit page in php however, it keep stating that "Parse error: syntax error, unexpected $end in home/..........................................". Can anyone help me to check my code if there are any mistakes. Since the code is extremely long therefore I have linked it to my business page …

Member Avatar for LastMitch
0
274
Member Avatar for shahai.ali

hi all i want to store the error of `mysql_error()` in a variable. i was trying the following: $alert_error = "<script type=\"text/javascript\"> alert('".mysql_error()."') </script>"; $id =5; $query = mysql_query("DELETE FROM abc WHERE id ='$id'") or die ($alert_error); actually my there is a foreign key constraint so when i click to …

Member Avatar for shahai.ali
0
614
Member Avatar for Kcachilove

Hello, Am a PHP developer , am working a hotel application but the issus am having here maynot be so heard to achive but am stock here and i need your help here. I have two table which are "blockedrooms" and "bookingstest" blockedrooms has `blockedrooms` (`id`, `id_item`, `the_date`, `id_state`, `id_booking`, …

Member Avatar for cereal
0
184
Member Avatar for ismael ahm@d

Hi all friends, I am trying to insert XML data using DOM, i completed mostly but little bit left, issue in the <field></field> the data between that not inserted in db, please consider the below mentioned XML file... <?xml version="1.0" encoding="UTF-8"?> <form name="mc1.dpp" application-name="mc1.dpp" application-id="34" document-id="1342" producer="Penvision Formidable Application Server" …

Member Avatar for ismael ahm@d
0
2K
Member Avatar for tibormarias

Dear Sirs! I would like to pass the $row[2] from my PHP code below <?php // MySQL mysql_connect("localhost", "", "") or die(mysql_error()); mysql_select_db("") 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 'Station name: '. $row[1]; echo …

Member Avatar for diafol
0
294
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
284
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
139
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
96
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
172
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
205
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
314
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
271
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
181
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

The End.