joking
Members-
Posts
29 -
Joined
-
Last visited
Never
Everything posted by joking
-
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 ?
-
Hi Try [url=http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm]http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm[/url]
-
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 ?
-
Cannot modify header information - zenphoto include
joking replied to n9ne's topic in PHP Coding Help
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. -
( HELP ME) how to print values in td? (retriving from db)
joking replied to rajmohan's topic in PHP Coding Help
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 ? -
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]
-
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]
-
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]
-
can anyone help me edit this php to make it search sub folders aswell
joking replied to madspof's topic in PHP Coding Help
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] -
displaying data from database into dropdown menus
joking replied to kikilahooch's topic in PHP Coding Help
You shouldnt post ur username and password in public.... plz remove them now. -
can anyone help me edit this php to make it search sub folders aswell
joking replied to madspof's topic in PHP Coding Help
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] -
displaying data from database into dropdown menus
joking replied to kikilahooch's topic in PHP Coding Help
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 -
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]
-
displaying data from database into dropdown menus
joking replied to kikilahooch's topic in PHP Coding Help
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 -
can anyone help me edit this php to make it search sub folders aswell
joking replied to madspof's topic in PHP Coding Help
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] -
I m sorry i didnt pay attention to your ' . you should use ' instead of " [code] <?php $week = "3"; $val = 10 - $week; echo 'There are currently '.$val.' weeks left before it is built.'; ?> [/code]
-
Hi, [code] <?php $week = "3"; $val = 10 - $week; echo 'There are currently: ".$val." weeks left before it is built.'; ?> [/code]
-
u can try: [code] <div style="color:#FFFFFF"><?php require("forum/SSI.php"); ssi_boardStats(); ?> </div> [/code] Usually i prefer to do it from inside the SSI.php page..../ I think if u have tables inside that page, the style wont affect inside them JoKinG
-
How to automatically delete records by date every night??
joking replied to sivarts's topic in PHP Coding Help
Error: No database selected with query DELETE FROM events_music WHERE event_date < '2006-08-29 Hi sivarts, Check if the path to your myConnections.php file is right and/or if it even exists. If it does exist and the path is right, try to post the script here BUT CHANGE the password, username and name of your database ( replace them by xxxx ) JoKinG -
I really need help here... plz anyone
-
I did try this be4 but also it didnt work. $errno is returning 0 and $socket is returning FALSE This indicates that the error occurred before the connect() call. This is most likely due to a problem initializing the socket. <---- this is from php.net
-
Yes i did. but still i didnt find anythg interresting regarding how to connect to an HTTPS link. Maybe the situation will be clearer if i explain my situation. I am trying to POST XML via HTTP for example i wanna post <request name=joe></request> to this link https://process.csc24seven.com/gateway/api.aspx Thank u 4 ur help
-
I just wanna add that i can connect to fsockopen('www.proactive.info', 80, &$errno, &$errstr, 30) But what i need to know is how can i connect to an HTTPS link ? PLZZZZZZZZZZZZZZZ HELP
-
Hi, I am having trouble connecting through fsockopen() here is the function: ------------------- $socket = fsockopen('http://www.proactive.info', 80, &$errno, &$errstr, 30) $errno is returning 0 Is there anythg i should to make it work ? Plz help
-
Hi jwk811, All i am trying to do is POST this data '<request name=joe></request>' to this link 'https://process.csc24seven.com/gateway/api.aspx' and i need to get the RESPONSE sent to me from this link.