SlideShare une entreprise Scribd logo
1  sur  2
<?php
/*Esta lineaespara incluirel archivoconlasvariables*/
include "registro.php";
/* CONECTARCON BASEDE DATOS**************** */
$con = mysql_connect($hostname,$user,$pass);
if (!$con){die('ERRORDECONEXION CON MYSQL: ' . mysql_error());}
/* ********************************************** */
/* CONECTA CON LA BASEDE DATOS **************** */
$database = mysql_select_db("inventario",$con);
if (!$database){die('ERRORCONEXIONCON BD:'.mysql_error());}
/* ********************************************** */
//REALIZARCONSULTA
$sql = "INSERT INTOregistrarVALUES
(NULL,'".$_POST['cod_patrimonial']."','".$_POST['fecha_registrar']."','".$_POST['area']."','".$_POST
['encargado']."','".$_POST['hardware']."','".$_POST['marca']."','".$_POST['modelo']."','".$_POST['de
scripcion']."')";
$result= mysql_query($sql);
if (! $result){
echo"La consultaSQLcontiene errores.".mysql_error();
exit();
}else {echo"<center><fontcolor='RED'>DATOSINSERTADOS
CORRECTAMENTE</font><aref='http://localhost/inventario2/index.php'>Volver</a&gt;'";
}
?>
<?php
$hostname = "localhost";//enmi casoes localhost
$user = "root"; //enmi caso root
$pass = "";
?>
PHP MySQL database registration

Contenu connexe

Tendances

TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !Matheus Marabesi
 
Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaionglslarmenta
 
Up.Php
Up.PhpUp.Php
Up.Phpwsoom
 
FLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookFLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookBastian Waidelich
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)bradoaks
 
Information Science Blog Aggregation
Information Science Blog AggregationInformation Science Blog Aggregation
Information Science Blog AggregationFranny Gaede
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony AppsKris Wallsmith
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonKris Wallsmith
 
Image upload in php MySql
Image upload in php MySqlImage upload in php MySql
Image upload in php MySqlIshaq Shinwari
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingMatheus Marabesi
 

Tendances (19)

Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
TICT #11
TICT #11 TICT #11
TICT #11
 
TICT #13
TICT #13TICT #13
TICT #13
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaion
 
Up.Php
Up.PhpUp.Php
Up.Php
 
FLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookFLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook book
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
 
Php verses my sql
Php verses my sqlPhp verses my sql
Php verses my sql
 
Information Science Blog Aggregation
Information Science Blog AggregationInformation Science Blog Aggregation
Information Science Blog Aggregation
 
Growing jQuery
Growing jQueryGrowing jQuery
Growing jQuery
 
[Php] navigations
[Php] navigations[Php] navigations
[Php] navigations
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
Image upload in php MySql
Image upload in php MySqlImage upload in php MySql
Image upload in php MySql
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
 
Php verses MySQL
Php verses MySQLPhp verses MySQL
Php verses MySQL
 

Similaire à PHP MySQL database registration

Php login system with admin features evolt
Php login system with admin features   evoltPhp login system with admin features   evolt
Php login system with admin features evoltGIMT
 
dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniquesjoaopmaia
 
GedcomX SDK - Getting Started
GedcomX SDK - Getting StartedGedcomX SDK - Getting Started
GedcomX SDK - Getting StartedDave Nash
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency InjectionRifat Nabi
 
15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilorRazvan Raducanu, PhD
 
WordPress Configuration tips
WordPress Configuration tipsWordPress Configuration tips
WordPress Configuration tipsMasharul Pamir
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
 
blog_db_interface.phpphpinclude_once(blog_exceptions.
blog_db_interface.phpphpinclude_once(blog_exceptions.blog_db_interface.phpphpinclude_once(blog_exceptions.
blog_db_interface.phpphpinclude_once(blog_exceptions.ChantellPantoja184
 
PHP DATABASE MANAGEMENT.pptx
PHP DATABASE MANAGEMENT.pptxPHP DATABASE MANAGEMENT.pptx
PHP DATABASE MANAGEMENT.pptxCynthiaKendi1
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Elena Kolevska
 
A 2-2 php on windows azure
A 2-2 php on windows azureA 2-2 php on windows azure
A 2-2 php on windows azureGoAzure
 
Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioningSource Ministry
 

Similaire à PHP MySQL database registration (20)

Php login system with admin features evolt
Php login system with admin features   evoltPhp login system with admin features   evolt
Php login system with admin features evolt
 
dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus Catalogue 2015
dcs plus Catalogue 2015
 
My shell
My shellMy shell
My shell
 
Twitter codeigniter library
Twitter codeigniter libraryTwitter codeigniter library
Twitter codeigniter library
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
C99
C99C99
C99
 
C99
C99C99
C99
 
GedcomX SDK - Getting Started
GedcomX SDK - Getting StartedGedcomX SDK - Getting Started
GedcomX SDK - Getting Started
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor
 
R57.Php
R57.PhpR57.Php
R57.Php
 
WordPress Configuration tips
WordPress Configuration tipsWordPress Configuration tips
WordPress Configuration tips
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
blog_db_interface.phpphpinclude_once(blog_exceptions.
blog_db_interface.phpphpinclude_once(blog_exceptions.blog_db_interface.phpphpinclude_once(blog_exceptions.
blog_db_interface.phpphpinclude_once(blog_exceptions.
 
PHP DATABASE MANAGEMENT.pptx
PHP DATABASE MANAGEMENT.pptxPHP DATABASE MANAGEMENT.pptx
PHP DATABASE MANAGEMENT.pptx
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5
 
PHP on Windows Azure
PHP on Windows Azure PHP on Windows Azure
PHP on Windows Azure
 
A 2-2 php on windows azure
A 2-2 php on windows azureA 2-2 php on windows azure
A 2-2 php on windows azure
 
Service discovery and configuration provisioning
Service discovery and configuration provisioningService discovery and configuration provisioning
Service discovery and configuration provisioning
 

Dernier

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Dernier (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

PHP MySQL database registration

  • 1. <?php /*Esta lineaespara incluirel archivoconlasvariables*/ include "registro.php"; /* CONECTARCON BASEDE DATOS**************** */ $con = mysql_connect($hostname,$user,$pass); if (!$con){die('ERRORDECONEXION CON MYSQL: ' . mysql_error());} /* ********************************************** */ /* CONECTA CON LA BASEDE DATOS **************** */ $database = mysql_select_db("inventario",$con); if (!$database){die('ERRORCONEXIONCON BD:'.mysql_error());} /* ********************************************** */ //REALIZARCONSULTA $sql = "INSERT INTOregistrarVALUES (NULL,'".$_POST['cod_patrimonial']."','".$_POST['fecha_registrar']."','".$_POST['area']."','".$_POST ['encargado']."','".$_POST['hardware']."','".$_POST['marca']."','".$_POST['modelo']."','".$_POST['de scripcion']."')"; $result= mysql_query($sql); if (! $result){ echo"La consultaSQLcontiene errores.".mysql_error(); exit(); }else {echo"<center><fontcolor='RED'>DATOSINSERTADOS CORRECTAMENTE</font><aref='http://localhost/inventario2/index.php'>Volver</a&gt;'"; } ?> <?php $hostname = "localhost";//enmi casoes localhost $user = "root"; //enmi caso root $pass = ""; ?>