Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9002751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:36:45+00:00 2026-06-16T00:36:45+00:00

I have to add in database many links that have same characteristics(Link type, country,

  • 0

I have to add in database many links that have same characteristics(Link type, country, author, project). For example I want to add 6 links-6rows in my database(see image), all at once. Please help me do that.

enter image description here

<html>
<head><title>Add values to DataBase</title></head>
    <body>
        <form name="input" action="" method="post">
            <table>
                    <tr>
                    <td>
                <b>Link Type: <br><input type="text" name="LinkType"><br>
                    </td>
                    <td>
                <b>Country: <br><input type="text" name="Country"><br>
                    </td>
                    </tr>
                    <tr>
                    <td>
                <b>Author: <br><input type="text" name="Author"><br>
                    </td>
                    <td>
                <b>Project: <br><input type="text" name="Project"><br>
                    </td>
                    </tr>
            </table>
                <b>Links:</b><br>
                    <textarea rows="20" cols="80" name='Link'>
                    </textarea><br>
                    <input type="submit" onclick="Confirmare()" name="introdu" value="Exporta">
        </form> 
    </body>
</html>

<?PHP

    error_reporting(E_ALL & ~E_NOTICE);
    mysql_connect("localhost", "root", "pechea.com") or die(mysql_error());
    mysql_select_db("repdb") or die(mysql_error());

    $Link=$_POST['Link'];
    $LinkType=$_POST['LinkType'];
    $Project=$_POST['Project'];
    $Date=$_POST['Date'];
    $Country=$_POST['Country'];
    $Author=$_POST['Author'];
    $Status=$_POST['Status'];




?>
<script type="text/javascript">
        function Confirmare()
        {
<?php
    mysql_query("INSERT INTO projects (Link, LinkType, Project, Date, Country, Author, Status)  
    VALUES ('".$Link."', '".$LinkType."', '".$Project."','".$Date."', '".$Country."', '".$Author."', '".$Status."') ")  or die(mysql_error());

?>
alert("Values Added in DB!");}
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:36:46+00:00Added an answer on June 16, 2026 at 12:36 am

    Explode links in the textarea

    $links = explode("\n", $_POST['Link']);
    

    Loop though links and insert

    foreach($links as $link) {
        mysql_query("INSERT ...");
    }
    

    Don’t forget to escape…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several columns in a MySQL database that I would like to add
I have to add some enum options to a database table. The problem being,
I am lost. I have localhost database (PostgreSQL) and I have to add port
Hї! I have wrote test for my application. I need add item to database
I have an Inventory Database and I need to add a validation rule to
I have a form and I need to add some data from database before
I have a OneToMany relationship in an SQL Server database. When I add the
I have a PHP application using an Oracle XE database. Whenever I add a
I have a loop pulling information from my database. How can I add a
I Have an Entity generated from a database table. Then I add a property

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.