Unstoppable Domains

Php script to work with sql database.

Spaceship Spaceship
Watch

Casteloes

Established Member
Impact
0
Does anyone knows a php script where I can change and manage a sql database?
I want to create the database (if the script don't do that there is no problem) and then add new records to it.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I can help if you like.

Send me a PM of what you want doing, and I will see if i have time.

I made php for metal-db.com -> is this the kinda thing your looking for? where users/you can add data to a database, or remove/edit it?
 
0
•••
0
•••
I can help you too, just send me pm with more informations...
 
0
•••
0
•••
I didn't want to pay for it :/
 
0
•••
NVD in my case is only one user to edit the database.
Is can be something like you sow changing the fields of curse.

averge e NVD i will try to explain what i want.
I want a database about art (paintings, sculptures and more).
My mais problem is to do it in a visual way. I can make the database from phpmyadmin but when the user add add records to it it show be something like that:

It have the field name and then the space to write.

I can't find nothing to do it.

This explanation help to understand what i want?

I will send pm too.
 
0
•••
Send me the name of the columns you have in your database and i'll code the form for you if thats all you require.
 
0
•••
If you just go to the "Insert" tab in PHPMyAdmin (assuming your column names are semidescriptive, or you can just tell the person inputting the data what each field is.

http://easycaptures.com/fs/uploaded/104/thumbs/9683438085_b.jpg


See the Insert tab selected? isn't this basically what you want? why reinvent the wheel?
 
0
•••
He did state he wants a GUI to do it with on a webpage, instead of having to log into the back end.

Just PM me the column names and I'll write the php, then you will just have to add the db name and user/pass into the variables, I'll let you know where
 
0
•••
0
•••
can you post the column names in the database & HTML for the form you wish to use and I'll quickly knock up a script for you.

Regards
 
0
•••
Removed code.
 
Last edited:
0
•••
instead of defining all of the variables from the get use a foreach loop to define array as => value saves a few lines of coding
 
0
•••
NVD said:
I told him to post the code I gave him for help, but no replies.


I contact averge by private message and that's why i don't put the code in topic.
 
0
•••
Removed the code for you then, was just trying to get it fixed for you. nevermind.

FrozenNova, i said it was long winded to prevent errors, and so it was easy to follow for Casteloes.
 
0
•••
NVD said:
Removed the code for you then, was just trying to get it fixed for you. nevermind.

FrozenNova, i said it was long winded to prevent errors, and so it was easy to follow for Casteloes.

I thanks you to trying to help me. Don't need to remove the code.
 
0
•••
here it is again then:

The code:

Code:
// PUT THE BELOW INTO insert.php

<?php

$con = mysql_connect("localhost","root","teste");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

$v1=$_GET["1"];
$v2=$_GET["2"];
$v3=$_GET["3"];
$v4=$_GET["4"];
$v5=$_GET["5"];
$v6=$_GET["6"];
$v7=$_GET["7"];
$v8=$_GET["8"];
$v9=$_GET["9"];
$v9b=$_GET["9b"];
$v10=$_GET["10"];
$v11=$_GET["11"];
$v12=$_GET["12"];
$v13=$_GET["13"];
$v14=$_GET["14"];
$v15=$_GET["15"];
$v16=$_GET["16"];
$v17=$_GET["17"];
$v18=$_GET["18"];
$v19=$_GET["19"];
$v20=$_GET["20"];
$v21=$_GET["21"];
$v22=$_GET["22"];
$v23=$_GET["23"];
$v24=$_GET["24"];
$v25=$_GET["25"];
$v26=$_GET["26"];
$v27=$_GET["27"];
$v28=$_GET["28"];
$v29=$_GET["29"];
$v30=$_GET["30"];
$v31=$_GET["31"];
$date=date("F jS Y");

mysql_select_db("severvouga", $con);

mysql_query("INSERT INTO table1( Categoria, SubCategoria , Denominaรงao, Identificacao, Localizacao, Enquadramento, Datacao, Autoria, Escola, Producao, Inscricoes, Iconografia, Materia, Suporte, Tecnica, Largura, Altura, Comprimento, Peso, Funcao, Descricao, Estado, Proveniencia, Propriedade, Proteccao, Incorporacao, Imagem, Historial, Bibliografia, Exposicoes, Observacoes, Preenchido, Data)
VALUES ('$v1', '$v2', '$v3', '$v4', '$v5', '$v6', '$v7', '$v8', '$v9', '$v9b', '$v10', '$v11', '$v12', '$v13', '$v14', '$v15', '$v16', '$v17', '$v18', '$v19', '$v20', '$v21', '$v22', '$v23', '$v24', '$v25', '$v26', '$v27', '$v28', '$v29', '$v30', '$v31', '$date')");

if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}

header("Location: form.html");

mysql_close($con);

?>


Form:
Code:
<!-- PUT THIS INTO form.html -->

<html>
<body>

<form action="insert.php" method="get">
<table>
<tr><td width="200" align="right">Categoria:</td><td> <input type="text" name="1" /></td></tr>
<tr><td width="200" align="right">Sub-Categoria:</td><td> <input type="text" name="2" /></td></tr>
<tr><td width="200" align="right">Denominaรงรฃo:</td><td> <input type="text" name="3" /></td></tr>
<tr><td width="200" align="right">Identificaรงรฃo:</td><td> <input type="text" name="4" /></td></tr>
<tr><td width="200" align="right">Localizaรงรฃo:</td><td> <input type="text" name="5" /></td></tr>
<tr><td width="200" align="right">Enquadramento:</td><td> <input type="text" name="6" /></td></tr>
<tr><td width="200" align="right">Dataรงรฃo:</td><td> <input type="text" name="7" /></td></tr>
<tr><td width="200" align="right">Autoria:</td><td> <input type="text" name="8" /></td></tr>
<tr><td width="200" align="right">Escola/Estilo:</td><td> <input type="text" name="9" /></td></tr>
<tr><td width="200" align="right">Produรงรฃo:</td><td> <input type="text" name="9b" /></td></tr>
<tr><td width="200" align="right">Marcas e Inscriรงรตes:</td><td> <input type="text" name="10" /></td></tr>
<tr><td width="200" align="right">Iconografia:</td><td> <input type="text" name="11" /></td></tr>
<tr><td width="200" align="right">Matรฉria:</td><td> <input type="text" name="12" /></td></tr>
<tr><td width="200" align="right">Suporte:</td><td> <input type="text" name="13" /></td></tr>
<tr><td width="200" align="right">Tรฉcnica:</td><td> <input type="text" name="14" /></td></tr>
<tr><td width="200" align="right">Dimensรตes Largura:</td><td> <input type="text" name="15" /></td></tr>
<tr><td width="200" align="right">Dimensรตes Altura:</td><td> <input type="text" name="16" /></td></tr>
<tr><td width="200" align="right">Dimensรตes Comprimento:</td><td> <input type="text" name="17" /></td></tr>
<tr><td width="200" align="right">Peso:</td><td> <input type="text" name="18" /></td></tr>
<tr><td width="200" align="right">Funรงรฃo Inicial/Alteraรงรตes:</td><td> <input type="text" name="19" /></td></tr>
<tr><td width="200" align="right">Descriรงรฃo:</td><td> <input type="text" name="20" /></td></tr>
<tr><td width="200" align="right">Estado de Conservaรงรฃo:</td><td> <input type="text" name="21" /></td></tr>
<tr><td width="200" align="right">Proveniรชncia:</td><td> <input type="text" name="22" /></td></tr>
<tr><td width="200" align="right">Propriedade:</td><td> <input type="text" name="23" /></td></tr>
<tr><td width="200" align="right">Protecรงรฃo:</td><td> <input type="text" name="24" /></td></tr>
<tr><td width="200" align="right">Incorporaรงรฃo:</td><td> <input type="text" name="25" /></td></tr>
<tr><td width="200" align="right">Imagem:</td><td> <input type="text" name="26" /></td></tr>
<tr><td width="200" align="right">Historial:</td><td> <input type="text" name="27" /></td></tr>
<tr><td width="200" align="right">Bibliografia:</td><td> <input type="text" name="28" /></td></tr>
<tr><td width="200" align="right">Exposiรงรตes:</td><td> <input type="text" name="29" /></td></tr>
<tr><td width="200" align="right">Observaรงรตes:</td><td> <input type="text" name="30" /></td></tr>
<tr><td width="200" align="right">Preenchido por:</td><td> <input type="text" name="31" /></td></tr>
</table>
<center><input type="submit" /></center>
</form>

</body>
</html>


The SELECT query I wrote him works though:
Code:
<?php

$con = mysql_connect("localhost","****","****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}


mysql_select_db("severvouga", $con);

$result = mysql_query("SELECT * FROM table1");

$i=1;

while($row = mysql_fetch_array($result))
  {
  echo "<b><u>Entry Number: ".$i."<br />";
  echo $row['Categoria'];
  echo "<br />";
  echo $row['SubCategoria'];
  echo "<br />";
  echo $row['Denominaรงao'];
  echo "<br />";
  echo $row['Identificacao'];
  echo "<br />";
  echo $row['Localizacao'];
  echo "<br />";
  echo $row['Enquadramento'];
  echo "<br /> etc... <br /><br />";

  }

mysql_close($con);
?>
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back