Search found 171 matches

by hrubos
Thu Jan 04, 2007 2:50 pm
Forum: PHP - Code
Topic: update multirows
Replies: 16
Views: 4879

update multirows

Hi all, would you mind showing me how do I wrong because I only can update one row, more I couldn't . page1.php ........... echo "<td width = '30'><input type='hidden' name='new_id_numberRoom[]' value='$id_numberRoom'></td>" ; echo "<td width = '90'><input type='text' name='new_number...
by hrubos
Thu Jan 04, 2007 3:51 am
Forum: PHP - Code
Topic: Sending Session Variable Values to Radio Buttons
Replies: 14
Views: 1185

I think that : <td><div align="center"><font face="Arial, Helvetica, sans-serif"><font size="2"> <input type="radio" name="<?php $_SESSION['answer'][5] ?>" value="6"> ..................... Have success!!![/quote]
by hrubos
Wed Jan 03, 2007 4:39 am
Forum: PHP - Code
Topic: How to send form to assigned emails depending on chosen opti
Replies: 3
Views: 404

I would do : page1.php <form method = "POST" action = "page2.php"> <td width=\"60%\"><select size=\"1\" name=\"language\"> <option>English</option> <option>German</option> <option>Polish</option> <option>Italian</option> <option>Russian</option> <opt...
by hrubos
Tue Jan 02, 2007 7:19 pm
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

It seemed that UPDATE can't be with IN ???
by hrubos
Tue Jan 02, 2007 6:31 pm
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

Why did I receive mess " warning : implode(): Bad arguments"???
by hrubos
Tue Jan 02, 2007 5:48 pm
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

Can I use ??? that $valId = implode(",",$_POST['new_id_numberRoom']); $valNum = implode(",",$_POST['new_number_room']); $valPri = implode(",",$_POST['new_price']); $valSta = implode(",",$_POST['new_state_room']); $query = "UPDATE room p,type_room t SET 'p...
by hrubos
Tue Jan 02, 2007 5:08 pm
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

I would use the 'IN' operator for MySQL and implode() your array into a string. ex: $values = implode(",",$_POST['checkboxarray']); $query = "SELECT * FROM `table` WHERE `whatever` IN ($values)"; obviously if your field is of type varchar etc, you'll need to add single quotes ar...
by hrubos
Tue Jan 02, 2007 1:26 pm
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

so who would mind showing me more detail

thank much !!!
by hrubos
Tue Jan 02, 2007 11:52 am
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

When chosing 2 rows, output wil be return 2 results. But in fact, mycode only return one last result.So example that : I want to edit 2 rooms so, I do click on 2 checkbox, but result which I receive is the last cliking. So, please help me how to make condition I did that but still not run edit_displ...
by hrubos
Tue Jan 02, 2007 8:04 am
Forum: PHP - Code
Topic: checkbox
Replies: 14
Views: 3670

checkbox

How to make condition to make loop after chosing by checkbox??? I use form so I have 2 pages : edit_display.php and edit_function.php $i=0; while ($i < $num ) { $id_numberRoom=mysql_result($result,$i,"id_numberRoom"); $number_room=mysql_result($result,$i,"number_room"); $building...
by hrubos
Mon Jan 01, 2007 9:12 am
Forum: PHP - Code
Topic: error while updating
Replies: 2
Views: 543

Corvin wrote:Remove the while loop (not the code it contains) and use DISTINCT to optimize your query.
oh la la la, it runs , thank much . :)
Happy new year !!!
by hrubos
Mon Jan 01, 2007 8:49 am
Forum: PHP - Code
Topic: error while updating
Replies: 2
Views: 543

error while updating

Why doesn't my command run ??? if(mysql_num_rows($result_query)>0){ $rc_student = ""; $s = $_SESSION['valid_idReser']; //return room which will be deleted $room_del="Select r.id_numberRoom FROM reservation r, room p WHERE r.id_reservation='$s'"; $result_room=mysql_query($room_del...
by hrubos
Sat Dec 30, 2006 4:56 am
Forum: PHP - Code
Topic: Colour of Text
Replies: 7
Views: 1044

so, work hard with PHP, you will love it

Enjoy it .
by hrubos
Fri Dec 29, 2006 11:16 am
Forum: PHP - Code
Topic: function
Replies: 5
Views: 621

so html can be wrtitten in function?Really I don't know it and I have a question about CSS, when I require so css doesn't run. I have written a page student_page.php, and I use aplication CSS here, but when I try only student_page.php, it's ok, but when I require, so only there is HTML. I don't know...
by hrubos
Fri Dec 29, 2006 6:09 am
Forum: PHP - Code
Topic: function
Replies: 5
Views: 621

Corvin wrote:You have to include function.php.
yeah, thank

and so too can use require