Jump to content

Matpatnik

Members
  • Posts

    227
  • Joined

  • Last visited

Posts posted by Matpatnik

  1. Hi guys,I'm not sure how to transfer my variable to the submit page. every else variable are send well except those two.Here the form.php

    	<th bgcolor="#FFFFFF" width="34%">Picture Real Name</th>	<td bgcolor="#E5E5E5" width="66%"><?php	if ($row['picture_realname'] == "") {		echo "<input name=\"picture_realname\" type=\"text\" size=\"40\" >";	} else {		$_POST['picture_realname'] = $picture_realname;		echo $picture_realname;	}?>	</td>  </tr>  <tr>	<th bgcolor="#FFFFFF" width="34%">Picture Name</th>	<td bgcolor="#E5E5E5" width="66%"><?php	if ($row['picture_name'] == "") {		echo "<input name=\"picture_name\" type=\"text\" size=\"40\" >";	} else {		$_POST['picture_name'] = $picture_name;		echo $picture_name;	}?>	</td>

    I tought by assigning the global variable $_POST['picture_name'] = $picture_name; would fix the problem but it didn't.Here the submit.php

    case "picture":					$sql = "UPDATE picture 							SET picture_name = '" . $_POST['picture_name'] . "', 								picture_date = CURDATE(), 								picture_usefor = '" . $_POST['picture_usefor'] . "', 								picture_info = '" . $_POST['picture_info'] . "', 								picture_type = '" . $_POST['picture_type'] . "', 								picture_weight = '" . $_POST['picture_weight'] . "', 								picture_realname = '" . $_POST['picture_realname'] . "', 								picture_ofmonth = '" . $_POST['picture_ofmonth'] . "' 							WHERE picture_id = '" . $_GET['id'] . "'";				break;

    Like I said every variable are fine excepte $picture_realname and $picture_name.If those to variable are empty then a text box will show insted fo the variable (that is fine and the submit too) but when the variable is not empty it show the name and realname... but when submited those two variable turn empty! so I have to goback and reedit them with the proper information :) Is there a way to send my two variable and get the proper information?Thank you for your helpMatpatnik

  2. You can use the <span> tag like

    <!-- html code --><span class="yourClass">bla bla bla</span>/*** yourSheet.css ***//**** xyForm.php ****/.yourClass a:hover {	color: #000000;}

  3. What type is `member`?
    'member' is juste a VARCHAR(1) to define if the quest in question is for member or not.I already tryed '1' and it doesn't work. but if I take off the WERE member=1 it work just fine except both member and non-member quest are mixed up
  4. Hi guys,I'm trying to get some specific data in alphabetical order but a soon as I write WHERE member=1 inside $result it tell me that error:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/local/4admin/apache/vhosts/runefr.com/httpdocs/quete/F2p/cookAssistant.php on line 70
    This is my code:
     <?php 	$con = mysql_connect("localhost","***","***");	if (!$con) {		die('Could not connect: ' . mysql_error());	}	mysql_select_db("***", $con);	$result = mysql_query("SELECT * FROM RuneFr_Quete WHERE member=1 ORDER BY quete");	echo "<table>	<tr>	<th>Les quête</th>	</tr>";	while($row = mysql_fetch_array($result)) {		echo "<tr>";		echo "<td>" . $row['quete'] . "</td>";		echo "</tr>";	}	echo "</table>";	mysql_close($con);?>

    I know there is a way of doing it but I don't how.Thank you for your helpMat

×
×
  • Create New...