Jump to content

text box variable


flemingmike

Recommended Posts

hello, how can i make a search button that when clicked, it takes the info from a text box and makes it a variable?  im trying to make a search function that can return this page:

 

<?php

include("style.php");

$hmm = simplexml_load_file('http://www.durhamit.ca:8181/1.0/?method=database.search&searcharg=**TEXT BOX INFO HERE**');

foreach($hmm->tracks->track as $tracks) {

    $artist = $tracks->artist;
    $title = $tracks->title;
    $album = $tracks->album; 
    $id = $tracks->id; 

echo '<table border="1" width="60%" align="center">';
echo '<tr>';
	echo '<td width="25%">'.$artist.'</td>';
	echo '<td width="25%">'.$title.'</td>';
	echo '<td width="25%">'.$album.'</td>';
	echo '<td width="25%"><a 

href="http://www.durhamit.ca:8181/1.0/?method=player.playDatabaseItem&id='.$id.'">Play</a></td>';
echo '</tr>';
echo '</table>';

}

?>

Link to comment
https://forums.phpfreaks.com/topic/205163-text-box-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.