Jump to content

manalnor

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by manalnor

  1. Hello dear friends and happy friday to all, I've question which really hurts me feeling long time ago and made alot of searching but can't find answer. let say we have $id and $do both are anything $id = "any"; $do = "foo"; And we have link in that looking yoursite.com/index.php?id=$id Now what is the command i should write or write in .htaccess file so make it when i call the following link yoursite.com/$id/$do be the same as if i called the original link which is yoursite.com/index.php?id=$id Note :- if it not possible then will if be possible in next way or yoursite.com/$do/$id Thanks for help !
  2. oh thanks for the informations. here is the main idea for ($i=1;$i>=1;$i++) { $id = rand(100, 100000); $sql= "insert into mytable set id='$id'"; } it means it will insert into database table an random number from btween 100 to 100000 but after 30 seconds it gives me the error Fatal error: Maximum execution time of 30 seconds exceeded so any idea ? i'm afraid if i set the MET > 30 Seconds will effects on my pc processor or internet router
  3. Hello friends, i'm using localserver which is AppServ and i want to run php function in closed loop and may takes hours and hours when i've tried, i've got that error Fatal error: Maximum execution time of 30 seconds exceeded what if i changed in PHP.INI setting for example max_execution_time = 99999999999999999; does it will effect on my pc or anything wrong or internet ..ect
  4. allright thank you.... i've found the error was in $i++ thanks problem sloved Hint: where is solved button !!
  5. @gristoi thank you but it shows error Parse error: syntax error, unexpected T_INC, expecting ')' in line for ($i=1; $i>=1; i++) thanks
  6. Hello dear friends, let say we have (function) and that function has one variable which is (id) the (id) could be number any number 1 or 4 or even 49999 whatever. how to make closed loop which i mean run this function in unlimited way each time with new id <--- i can do it by set random() but the problem i've is how to make it repeat itself excuted excuted excuted | | | ect let say for example , i will insert random number in at database table $id = rand(); mysql_query("INSERT INTO comments(id) VALUES ('$id')"); that is it, how then i can repeat it many many times without 1) refresh 2) rewrite it many times thanks in advance
  7. @btherl thank you so much , it works perfect now and i've understood it
  8. Hello dear friends, say i've form with 2 variables which i want to post to another file file 1 <script type="text/javascript"> // <![CDATA[ $(document).ready(function(){ $('#loader').hide(); $('#inner').children().click(function(){ var a = $(this).attr("name"); $.post("rating.php?value="+a,{}, function(response){ $('#inner').fadeOut(); $('#inner').html(unescape(response)); $('#inner').fadeIn(); setTimeout("hideMesg();", 2000); }); }); }); function hideMesg(){ $('.rating_message').fadeOut(); $.post("rating.php?show=1", {}, function(response){ $('#inner').html(unescape(response)); $('#inner').fadeIn('slow'); }); } // ]]> </script> this will post the following ( the value of name ) <div class="rating_dis" name="<?php echo $k?>" id="<?=$id?>"> </div> but i want it also to post the value of the (id) here is the second file which should get the name if($_REQUEST['value']){ $name = $_REQUEST['value']; $query = "insert into rating (rated, channelid) values ('$name', '$idz')"; mysql_query( $query); } so the problem is how to send from file 1 to file 2 both the (name) and (id) how to double this ? var a = $(this).attr("name"); $.post("rating.php?value="+a,{}, to be also var a = $(this).attr("id"); $.post("rating.php?any="+a,{}, then i can get it from file 2 easily get both. thank you :'(
  9. thank you so much yes that was what i need and thank you for the informations
  10. Hello dear friends, I've simple question if i've file called file.php and i want to make button (not href link) just button as <input> when i click on it, it will run file.php just like (href) thanks
  11. yes thank you so much i've forgot to mention this it is normal auto_increment (number 1,2,3,4,5--->ect) `id` int(3) NOT NULL auto_increment, so any way how to apply it
  12. Hello dear friends, say i've database table with (id,name) and want to add more informations by insert new names within an file for example has $q1 = "INSERT INTO `mytable` VALUES (???,name1); mysql_query($q1) or die(mysql_error()." at row ".__LINE__); $q2 = "INSERT INTO `mytable` VALUES (???,name2); mysql_query($q2) or die(mysql_error()." at row ".__LINE__); ect..... how then it automatic detect the last id to go on after it ? some says use mysql_insert_id but i didn't understand how to apply it in this way also the example at php.net is bad not explain much please how can i use it thanks
  13. any idea how to write the .htaccess rule in this cas
  14. i've fixed the _ to - and html to htm as you've said. but do you have any idea how would be the htaccess rule if i'm willing to make the link $id/$to.htm
  15. Hello dear friends, Let say we have $to = "gigi"; then we have link like this mysite.com/file.php?id=$1 We can change it to new form by add rule at .htaccess codes RewriteRule -(.*)\.htm file.php?id=$1 So that the link be like this mysite.com/$to-$id.htm it will works , Now what if i want to make the link like this mysite.com/$id/$to.htm what will be the .htaccess code in this way ??? thanks
  16. Hello dear friends, Let say we have $to = "gigi"; then we have link like this mysite.com/$to_$id.html with indeed .htaccess code RewriteRule -(.*)\.htm file.php?id=$1 it will works , Now what if i want to make the link like this mysite.com/$id/$to.html what will be the .htaccess code in this way ???
  17. the error when i click submit, it does not update the database table with the new entry. Indeed there is connection, assume it. Well i've tried it on many hosting some works and other not then i figure out if i made that changes, it will works For file x.php if(isset($_POST[s1])) { $qeg = "update table set name = '$_POST[name]' "; $reg = mysql_query($qeg) or die(mysql_error()); echo "Updated"; } <form action="y.php" method="post" name="form"> Name : <input name="name" type="text" id="name" value=""> <input type="Submit" name="s1" value="Save"> this will works ! so i only changed function executeUpdate so any Why
  18. Hello dear friends, I've 2 files x.php and y.php and func.php Where x.php is an form <form action="y.php" method="post" name="form"> Name : <input name="name" type="text" id="name" value=""> <input type="Submit" name="Submit" value="Save"> it should send informations to file y.php and file y.php include "func.php"; $sql= "update table set name='$name'"; executeupdate($sql); at func.php there is function of executeupdate as following function executeUpdate($sql) { mysql_query($sql) or die("query failed: $sql".mysql_error()); } Now x.php ---> send info to y.php that needs func.php to update the database table NOW !!!!!! my question why why why it works with an hosting and not working on other hosting. does function executeUpdate($sql) no longer work or what ! please help and advice me thanks
  19. @Pikachu2000 thank you for the informations @dornizar i've tired and thank alot , works fine
  20. Hello dear friends, i've made database table if(isset($_POST[s1])) { $qeg = "update my_table set code = '$_POST[code]' "; $reg = mysql_query($qeg) or die(mysql_error()); echo 'done'; } and get the stored text in my table $qeg = "select * from my_table"; $reg = mysql_query($qeg) or die(mysql_error()); $aeg = mysql_fetch_array($reg); and an form for it to post text <form method=post> code : <textarea id="code" name="code"><?=$aeg[code]?></textarea> <input type=submit name="s1" value="Add"> </form> now when i post example : <?php date("Y-m-d"); ?> it should be stored but when i call it in an php file , it not appear <?php $qeg = "select * from my_table"; $reg = mysql_query($qeg) or die(mysql_error()); $aeg = mysql_fetch_array($reg); ?> <?=$aeg[code]?> why !!! can't store php code into mysql table sorry for bad english , i mean db table <--- store in it an php code when i call it back it doesn't apprears when i view page source it appears but not active as if plain text as in the pink colored text can be seen in source but not active thank you
  21. Hi, How to get paypal transection id on return after someone pay if i've paypal payment form as following <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?=$line[paypalid]?>"> <input type="hidden" name="item_name" value="Payment Your Hits"> <input type="hidden" name="item_number" value="1"> <input type="hidden" name="amount" value="<?=$usd?>"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="payment from website submittion"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="AU"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="hidden" name="return" value="<?=$site_root?>/return.php?id=<?=$line[id]?>"> <button type="submit" class="clean-green">Pay Now</button> </form> on return i will get it by id which is <?$line[id]?> but i want to get the transection id of payment too how it comes ?
  22. Hello friends, how can i combain this codes If i've 3 functions $limited,$refere,$pass all have commen result echo "good"; if($limited){if($hits >= $limited){echo "U1";}else{echo "Good";}} else {echo "Good";} ================================= if($refere){if($me >= $you){echo "U2";}else{echo "Good";}} else {echo "Good";} ================================= if($pass){if($she >= $he){echo "U3";}else{echo "Good";}} else {echo "Good";} thansk, it would really helps me alot
  23. hello friends, that would help me alot , if i've 2 code all are of if and else code 1 $r = $_SERVER['HTTP_REFERER'];if (stripos($r, $refere) !== false) {echo "good";}else{echo "bad";} code 2 if($line[hits] >= $limited){echo "bad";}else{echo "good";} both are 2 codes where the user should pass before it show good how then it be 1 code not 2 ( if x if y else y2 else x2 ) it like double sandwich
  24. i want extact to say if something show form else show anything but i wanna say if something show form if correct pass show good else show bad else show anything so how then it could be ? cause when i enter the password it loop and i get form again !
  25. Hello friends, I've the following form code $pword = "123456"; <form method="post">Password <input type="password" name="password"><input type="submit" name="Submit"/> and it submit the password to the same page if (isset($_POST['password']) && $_POST['password'] == $pword) {echo "good";}else{echo "bad";} the problem when i do enter the password it reload the page and hence i get login input too so it is like look i wannt get echo "good"; if entered correct. thanks
×
×
  • 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.