Jump to content

joking

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

About joking

  • Birthday 02/13/1984

Contact Methods

  • MSN
    ya_mama_@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    Lebanon

joking's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I am having a problem with the exec() function I am trying to execute a binary file that i have ... but it keeps returning nothing ( like it didnt find the file ) my code: $parm="merchant_id=xxx"; $parm="$parm merchant_country=xxx"; $parm="$parm amount=xxx"; $parm="$parm currency_code=xxx"; $parm="$parm pathfile=C:\\CKServer\\qwe\\param\\pathfile"; $path_bin = "C:\\CKServer\\qwe\\bin\\request"; $result = exec("$path_bin $parm"); the problem is that $result is always empty I have also tried to put exec("$path_bin $parm",$result); but also the $result was an empy ARRAY NOTE: The permissions on the all the files are 777 and the path is correct of course Anyone has any idea ?
  2. Hi Try [url=http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm]http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm[/url]
  3. You can try to use: [code]$HTTP_SESSION_VARS[] instead of $_SESSION[] [/code] or [code] session_register('s_var'); $s_var = 'loged in'; [/code] and can you see what version of PHP is running on your server ?
  4. Hi, [b]You should try to post some code first....[/b] are you using sessions or the function header("Location:...") in your code ?  ? If you are... then you cant use echo or output anythg be4 them.
  5. Can you plz be more specific about wht u want  ? Can you post some code ? [code] <table width=100%> <?PHP $strSQL = mysql_query("SELECT FROM table WHERE ..."); while ( $row = mysql_fetch_object($strSQL) ):?> <tr>   <td><?PHP echo $row->$value ?></td>   <td><?PHP echo $row->$value2 ?></td> </tr> <?PHP endwhile; ?> </table> [/code] IS what you want similar to this  ?
  6. Just use the following code [code] <b>Search by Username:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">Username:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="query"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtn" value="-Search-"></td></tr> </table> </form><br> <b>Search by Email:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">Email:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="queryEM"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtnEM" value="-Search-"></td></tr> </table> </form> <b>Search by First Name:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">First Name:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="queryFN"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtnFN" value="-Search-"></td></tr> </table> </form> <br> <br><hr><br> <b><u><font color=red>Your Results:</font></u></b><br> <? $end = round(microtime(true) - $start, 3); echo 'Query completed in <b>' . $end . '</b> seconds'; ?> <center> <?php if($_POST[queryBtn]){ $sql = "SELECT * FROM users WHERE username LIKE '%$_POST[query]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>".$row[username]."</b></a><hr width=50%><br>"; } } if($_POST[queryBtnEM]){ $sql = "SELECT * FROM users WHERE email LIKE '%$_POST[queryEM]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "Email: " .$row[email]. "<br>"; echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>".$row[username]."</b></a><hr width=50%><br>"; } } if($_POST[queryBtnFN]){ $sql = "SELECT * FROM users WHERE fname LIKE '%$_POST[queryFN]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "First Name:" .$row[fname]. "<br>"; echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>" .$row[username]. "</b></a><hr width=50%><br>"; } } ?> [/code]
  7. Here is the updated code: [code] <b>Search by Username:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">Username:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="query"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtn" value="-Search-"></td></tr> </table> </form><br> <b>Search by Email:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">Email:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="queryEM"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtnEM" value="-Search-"></td></tr> </table> </form> <b>Search by First Name:</b> <form action="" method="post">       <table align="center" border="0" cellspacing="0" cellpadding="3"> <tr><td bgcolor="#3399CC"><font color="black">First Name:</font></td></tr> <tr><td bgcolor="#3399CC"><input type="input" name="queryFN"></td></tr> <tr><td colspan="2" align="right"><input type="submit" name="queryBtnFN" value="-Search-"></td></tr> </table> </form> <br> <br><hr><br> <b><u><font color=red>Your Results:</font></u></b><br> <? $end = round(microtime(true) - $start, 3); echo 'Query completed in <b>' . $end . '</b> seconds'; ?> <center> <?php if($_POST[queryBtn]){ $sql = "SELECT * FROM users WHERE username LIKE '%$_POST[query]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>".$row[username]."</b></a><hr width=50%><br>"; } } if($_POST[queryBtnEM]){ $sql = "SELECT * FROM users WHERE email LIKE '%$_POST[queryEM]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "Email: " .$row[email]. "<br>"; echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>".$row[username]."</b></a><hr width=50%><br>"; } } if($_POST[queryBtnFN]){ $sql = "SELECT * FROM users WHERE fname LIKE '%$_POST[queryFN]%'"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { echo "First Name:" .$row[fname]. "<br>"; echo "Username: <a href='getInfo.php?user=" .$row[username]. "'><b>" .$row[username]. "</b></a><hr width=50%><br>"; } } ?> [/code]
  8. The query isnt being executed REPLACE THIS : [code] $query2 = "UPDATE product SET prodName='$prodName', dept='$dept', brand='$brand', type='$type', image='$image', price='$price' WHERE prodId ='$prodId' and shopName='$shopName'"; [/code] with this : [code] $query2 = mysql_query("UPDATE product SET prodName='$prodName', dept='$dept', brand='$brand', type='$type', image='$image', price='$price' WHERE prodId ='$prodId' and shopName='$shopName'"); [/code]
  9. madspof you should really try to search and find answers for urself. The part of the URL that is causing u trouble is $file So u should replace the " " in $file with "%20" ...... it should be like this [code] echo "<a href=playertest.php?song=".str_replace("", "%20", $file)." target=banner2><strong>$spaces $file</strong></a><br />"; [/code]
  10. You shouldnt post ur username and password in public.... plz remove them now.
  11. try str_replace("", "%20", $URL); Go to this link and view more info about this functio: [url=http://www.php.net/manual/en/function.str-replace.php]http://www.php.net/manual/en/function.str-replace.php[/url]
  12. This code should be inserted where you want the drop down box to be. example: [code] <table width=100%> <tr> <td>Countries</td> <td><?PHP THE CODE I GAVE YOU ?></td> </tr> </table> [/code] JoKinG
  13. Hi, I updated ur code .... [code] <?php include("db.php"); $prodId = 0;  // UPDATED $prodId = $_GET['prodId']; $sql = "select * from product where prodId = '$prodId'"; //db //$result = mysql_query($sql,$conn) or die(mysql_error()); if ( (isset($_POST['submittedUpdate'])) || ($prodId != 0) ) {     $prodId        = mysql_real_escape_string(trim($_POST['prodId']));     $sName          = mysql_real_escape_string(trim($_POST['shopName']));     $dept          = mysql_real_escape_string(trim($_POST['dept']));     $brand          = mysql_real_escape_string(trim($_POST['brand']));     $type          = mysql_real_escape_string(trim($_POST['type']));     $image          = mysql_real_escape_string(trim($_POST['image']));     $price          = mysql_real_escape_string(trim($_POST['price'])); $query2 = "UPDATE product SET prodName='$prodName', dept='$dept', brand='$brand', type='$type', image='$image', price='$price' WHERE prodId ='$prodId' and shopName='$shopName'"; $query = "SELECT * FROM product WHERE prodId = '$prodId'"; if ($result = mysql_query($query)) {     $row = mysql_fetch_array($result, MYSQL_ASSOC)     ?>     <form action="admin_update2.php" method="post">     <input type="hidden" name="prodId" value="<?php echo $prodId; ?>">     <center>     <table align="center" cellspacing="0" cellpadding="5" bgcolor="#ffffff" border=1 bordercolor="#2696b8">         <TR><TD align="left" bgcolor="#2696b8" width="30%"><FONT color="white"><B>Product Id: </B></FONT></TD>         <TD width="70%"><?php echo $row['prodId'] ?></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Shop Name:</B></FONT></TD>         <TD width="70%"><?php echo $row['shopName'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Product Name:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name=name value="<?php echo $row['prodName'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Department:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name="surname" value="<?php echo $row['dept'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Brand:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name="address" value="<?php echo $row['brand'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Type:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name="address2" value="<?php echo $row['type'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Image:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name="county" value="<?php echo $row['image'] ?>"></TD></TR>         <TR><TD align="right" bgcolor="#2696b8"><FONT color="white"><B>Price:</B></FONT></TD>         <TD><INPUT type="text" maxLength=45 size=45 name="county" value="<?php echo $row['price'] ?>"></TD></TR> <TR><TD></td>         <TD><CENTER><input name=submit type=submit value="UPDATE">         <FONT color=navy></FONT></P></TD></TR>         </TBODY> <input type="hidden" name="prodId" value='.$prodId.'> <input type="hidden" name="submittedUpdate" value="TRUE"/></td></tr>     </TABLE>     </FORM>     <?php } } ?> </body> </html> [/code]
  14. You copy and pasted all the page's code..... Anyway i will give u a code i usually use in my project It will display data from ur database and put them in a dropdown box [code] <select name="SELECT_NAME" id="SELECT_NAME">         <?   $SQL = mysql_query("SELECT destination FROM bus WHERE source = ’Wexford’ UNION SELECT destination FROM train WHERE  source = ’Wexford’);   while ( $row = mysql_fetch_object($SQL) ):   ?>         <option value="<? echo $row->DESTINATION_ID?>"><? echo $row->DESTINATION_NAME?></option>         <? endwhile?>         </select> [/code] Just replace: 1- SELECT_NAME with the name of the select you want 2- DESTINATION_ID with the name of the select you want 3- DESTINATION_NAME with the name of the select you want Hope this do the trick for you JoKinG
  15. JUST ADD THE LINK in the echo ........... instead of [code]echo "<strong>$spaces $file</strong><br />";[/code] write: [code]echo "<a href=playertest.php?song=$file target=banner2><strong>$spaces $file</strong></a><br />";[/code]
×
×
  • 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.