Click here to Skip to main content
15,890,123 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: Calling PHP function and return array Pin
xiaoqiangdiandian27-Jun-14 21:01
xiaoqiangdiandian27-Jun-14 21:01 
QuestionPHP, Sql 2008, Web Services and JSON Pin
Member 1029700320-Jun-14 18:26
Member 1029700320-Jun-14 18:26 
AnswerRe: PHP, Sql 2008, Web Services and JSON Pin
vivekkamate7-Jul-14 1:42
vivekkamate7-Jul-14 1:42 
QuestionSQLServer2005 Pin
MianSaeedShahid19-Jun-14 5:23
MianSaeedShahid19-Jun-14 5:23 
Questionrecommended PHP Framework Pin
Jassim Rahma4-Jun-14 10:12
Jassim Rahma4-Jun-14 10:12 
AnswerRe: recommended PHP Framework Pin
HardikPatel.SE5-Jun-14 4:01
professionalHardikPatel.SE5-Jun-14 4:01 
AnswerRe: recommended PHP Framework Pin
Daniel Lieberwirth (BrainInBlack)28-Jun-14 0:03
professionalDaniel Lieberwirth (BrainInBlack)28-Jun-14 0:03 
QuestionPHP & MySQL Pin
Xekria27-May-14 10:14
Xekria27-May-14 10:14 
Hi guys! I need your help !
I'm doing a form in PHP and a want to display in my dropdownlist name column from my DB and save the name_id of that name selected from dropdownlist in DB.
Here is my code
PHP
if(isset($_POST["submit"]))
	{
	$bookshop_id = mysql_real_escape_string($_POST["bookshop_id"]);
	$book_id = mysql_real_escape_string($_POST["book_id"]);
	$quantity = mysql_real_escape_string($_POST["quantity"]);
		
mysql_query("INSERT INTO `books_bookshop`(`bookshop_id`,`book_id`,`quantity`)
             VALUES ('" . $bookshop_id . "','" . $book_id . "','" . $quantity . "')") 
or die ("Book could not be registered.");
		
}
	
?>

<form method="post" action="#">
<label for="bookshop_id">Bookshop Name</label>
<select style="width:148px;"  id="bookshop_id" name="bookshop_id" value="bookshop_id" >
<?php
$query = mysql_query("SELECT `name`,`bookshop_id` FROM `bookshop`");
while ($row = mysql_fetch_array($query))
{
?>
<option>
<?php echo $row["name"]; ?>
</option>
<?php } ?>
</select>
</td>
</tr>
<tr><td><select name="book" id="book" value="book">
<?php $query = mysql_query("SELECT `name` FROM `books`");
while ($row = mysql_fetch_array($query)){?>
<option><?php echo $row["name"]; ?></option>
<?php } ?>
</select>
<tr>
<td><input type"submit" name="submit" value="Register book"></td>
</tr>
</table>
</form>

AnswerRe: PHP & MySQL Pin
Xekria27-May-14 10:17
Xekria27-May-14 10:17 
GeneralRe: PHP & MySQL Pin
Xekria27-May-14 10:20
Xekria27-May-14 10:20 
QuestionRe: PHP & MySQL Pin
Richard MacCutchan27-May-14 21:21
mveRichard MacCutchan27-May-14 21:21 
AnswerRe: PHP & MySQL Pin
mrjay4227-Oct-14 22:34
mrjay4227-Oct-14 22:34 
Questiondynamic navigation menu using PHP Pin
stunt-man26-May-14 21:26
stunt-man26-May-14 21:26 
AnswerRe: dynamic navigation menu using PHP Pin
vivekkamate18-Jul-14 0:51
vivekkamate18-Jul-14 0:51 
QuestionCompress a whole folder and all its content on a remote FTP Server with PHP Pin
GoogleBoss25-May-14 23:08
GoogleBoss25-May-14 23:08 
AnswerRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
Kornfeld Eliyahu Peter25-May-14 23:23
professionalKornfeld Eliyahu Peter25-May-14 23:23 
GeneralRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
GoogleBoss26-May-14 23:34
GoogleBoss26-May-14 23:34 
AnswerRe: Compress a whole folder and all its content on a remote FTP Server with PHP Pin
Kornfeld Eliyahu Peter26-May-14 23:49
professionalKornfeld Eliyahu Peter26-May-14 23:49 
QuestionHow do I create a Joomla module? Pin
Brady Kelly24-May-14 3:44
Brady Kelly24-May-14 3:44 
Questionphp view report with paging Pin
Member 825050516-May-14 4:03
Member 825050516-May-14 4:03 
AnswerRe: php view report with paging Pin
thatraja16-May-14 5:32
professionalthatraja16-May-14 5:32 
QuestionPhoto upload using PHP and HTML5 Pin
Jassim Rahma9-May-14 6:40
Jassim Rahma9-May-14 6:40 
AnswerRe: Photo upload using PHP and HTML5 Pin
Member 108727482-Jul-14 2:38
Member 108727482-Jul-14 2:38 
AnswerRe: Photo upload using PHP and HTML5 Pin
Weekendrockstar1-Sep-14 7:09
Weekendrockstar1-Sep-14 7:09 
QuestionSOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://domain/index.php/api/v2_soap/?wsdl=1’ : failed to load external entity “http://domain/index.php Pin
Member 77023086-May-14 19:53
Member 77023086-May-14 19:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.