Customer Service Chat
Get quote & make Payment
Php / mysql issues, computer programming, Programming Languages
Im having problems with my php / mysql code.
I am trying to make it so it looks for an asset Number and if it is in the shop
if the asset is in the database but is not in the shop I want it to change it to be in the shop.
If the asset is not in the database I want it to create a new row with the information provided by my table.
here is all the php code
$table = "shop_inventory";
unset ($db_username, $db_password);
//$Log_Time = $_POST[''Log_Time''];
//$Log_Date = $_POST[''Log_Date''];
$Asset = $_POST[''Asset''];
$Manufacture = $_POST[''Manufacture''];
$Model = $_POST[''Model''];
$sn = $_POST[''sn''];
$Type = $_POST[''Type''];
$Building = $_POST[''Building''];
$RoomNumber = $_POST[''Room_Number''];
$In_Shop = $_POST[''In_Shop''];
$all = mysql_query(''SELECT * FROM $table'');
//$row = mysql_fetch_array($all);
if ("SELECT * FROM $table WHERE Asset=$_POST[Asset] and In_Shop=0")
mysql_query("UPDATE $table SET In_Shop=1 WHERE Asset=$_POST[Asset]");
echo "If ran";
"INSERT INTO $table (Asset, Manufacture, Model, Serial_Number, Type, Building, In_Shop, Room_Number)
($_POST[Asset], $_POST[Manufacture], $_POST[Model], $_POST[sn], $_POST[Type], $_POST[Building], $_POST[In_Shop], $_POST[Room_Number]";
echo "else ran";
echo "$Asset Added to Inventory";
header(''Refresh: 5; URL=../subpages/shopmain.php'');
Posted Date: 3/16/2012 10:47:33 PM | Location : United States
Ask an Expert
Php / mysql issues, computer programming, Assignment Help, Ask Question on Php / mysql issues, computer programming, Get Answer, Expert's Help, Php / mysql issues, computer programming Discussions
Write discussion on Php / mysql issues, computer programming
Your posts are moderated
Write your message here..
Develop html code create web page of blue color , 1. Develop an HTML code ...
1. Develop an HTML code to create a Web page of blue color & display links in red color. 2. Develop an HTML code to create a Web page which contains an image at its center.
About oracle, do you solve questions of assigments?
do you solve questions of assigments?
.net class library, .NET class library .NET structure comes with just on...
.NET class library .NET structure comes with just one category selection. And that all developers need to learn!! Whether they create the value in C# or VB.NET or J#, it doesn't
Programming assignment, The fancy new French restaurant La Food is very p...
The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of t
Object-oriented languages, Object-oriented languages Languages that sup...
Object-oriented languages Languages that support OOP features can be classified into the following two categories: 1. Object-based programming languages, and 2. O
Matrices and vectors, This section is proposed to be a catch all for severa...
This section is proposed to be a catch all for several of the fundamental concepts which are used occasionally in working with systems of differential equations. There will not be
Computer in education.., EXPLAIN CAI? AND ITS PITFALLS
EXPLAIN CAI? AND ITS PITFALLS
Cookies management with perl, One of the main strengths of the Perl program...
One of the main strengths of the Perl programming language are its powerful text manipulation features. In this assignment, you will put them to use for writing a Perl program tha
Find out starting address of stack segment, For the following Code answer t...
For the following Code answer the following questions-: .STACK 100H .DATA COUNT DB 10 TOTAL DW 4126H .CODE MAIN PROC MOV BX, 3F20H MOV AL, BL MOV BL, COUNT MOV
Write a program to decrypt encrypted messages, You are working for a crypto...
You are working for a cryptography department, where one of your jobs is to decipher intercepted messages that have been encrypted using a book cipher. The messages are sent by dif
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Terms & Conditions
Copyright by ExpertsMind IT Educational Pvt. Ltd.