CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, Fhalcon, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Sun Aug 14, 2022 7:03 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: link with mysqli
PostPosted: Sat Mar 07, 2020 1:21 am 

Joined: Tue Jun 16, 2015 1:03 am
Posts: 15
All the code below is intended to and does create a dropdown which selects a record(url)
and submit produces and does not display a table row with a link to the record.
"select & submit" goes back to "select & submit". I've been working on this along time.
anyone work with mysqli?
<title>lookup menu</title>
<form name="form" method="post" action="">

// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
include 'homedb-connect.php';

//This creates the drop down box
echo "<select name= 'target'>";
echo '<option value="">'.'--- Select account ---'.'</option>';
= mysqli_query(,"SELECT target FROM lookuptbl");
= mysqli_query(,"SELECT * FROM lookuptbl");
{echo "<option value='". ['target']."'>".['target']
echo '</select>';
<input type="submit" name="submit" value="Submit"/>

// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
include 'homedb-connect.php';

// ==============================================
= Array['target'];
// ===============================================
="SELECT target, purpose, user, password, email, visits, date, saved
FROM lookuptbl WHERE target = '". mysqli_real_escape_string (  ,  ) . "'";
// ===============================================================================

= mysqli_query(,);
{echo "Error:".(mysqli_error());}

//display the table
        echo '<table border="1"><tr><td bgcolor="#ccffff" align="center">lookup menu</td></tr>
        <table border="1">
        <tr bgcolor="#ccffff">
        <td> Target </td>
        <td> Purpose </td>
        <td> User </td>
        <td> Password </td>
        <td> Email </td>
        <td> Visits </td>
        <td> Date </td>
        <td> Saved </td>


// ==========================================================
= "http://localhost/home/crud-link.php?target=". [0];
= '<a href="'..'">'. [0]. '</a>';
// ===========================================================

echo ("<tr><td>  </td><td>[1]</td><td>[2]</td><td>[3]</td>
        echo '</table>

 Post subject: Re: link with mysqli
PostPosted: Tue Mar 24, 2020 2:34 pm 
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3842

You form uses POST method.
So You should work with $_POST instead of $_GET

= Array['target'];

Codelobster Team.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 24 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2016 phpBB Group