Jump to content

shamuraq

Members
  • Posts

    140
  • Joined

  • Last visited

Everything posted by shamuraq

  1. Thanx Ken27k... really appreaciate it...
  2. Hi Guys to randomise an int, we use (rand). How do i duplicate an image into random number of that single image based on (rand)? Meaning if the output from (rand) is 5, i need 5 of that image to be reflected.
  3. Hi guys, I'm trying to script a PDF conversion tool for every of my pages. When i try to echo the page/file name to the PDF script using $_SERVER['PHP_SELF'],$_SERVER['QUERY_STRING'], $_SERVER['SCRIPT_FILENAME'], $_SERVER['SCRIPT_NAME'] etc. it keeps returning "index.php". Is there anyway i can point directly to the files that i placed the button for pdf conversion? Thanx
  4. I'll definitely look into it... Thanx again Daniel0... You guys are the helpful pros...
  5. echo is a language construct, and not a function. Either way, it takes a string as argument. PHP is weakly typed, so scalar non-string values will implicitly be converted to strings for usage in a string context. It's only converted for that purpose though and isn't stored anywhere. I swear i honestly wish i could fully grasp and understand your statement but i really appreciate the prompt attention i am getting from pros like you guys... Thanx again Daniel and the gurus...
  6. thanx Mchl... but because i need to solve it later... does <echo> function store the output as variable or integer? what do you think of: $z4= -1*$z2; echo $z4; Please give me your comments...
  7. thanx Mchl... what about the other way ard?
  8. Hi all... Thanx for all your responses regarding my query to manipulating integer. I have slight problem that i hope you can help me out with... How then do i convert a negative integer to a positive integer. I'm doing an algebraic equation and i am very sure you already know that when you bring a positive integer over the other side of the equal sign (2x-3y + 6 = 0) they become a negative integer (2x-3y = -6) and vice versa. Anyway proper syntax for this?
  9. thanx Mchl. I truly appreciate a;; the help. Thanx y'all
  10. Hi All, I would like to add a positive sign "+" infront of a positive integer. Is there a proper syntax to it without the <echo> function so that php still treat it as integer rather than a variable for further mathematical function to take place? -thanx all
  11. Yes genericnumber1, I already have the value of x and y (i already have the working solution base on this particular template). However being a newbie and a dumbwit i must admit, what is eval()? seems like it has its downside. I apologise for the late respond (internet intermittent problem at my location).
  12. Hi all, I'm trying to programme a PHP script (i'm a newbie in need of a guidance) to generate random algebraic expression including the addition and subtraction symbol. After which the reflected randomized will also solve the problem. Randomising part: <tr> <td> <? $x = rand(0,20); $y = rand(0,20); $z = rand(0,20); $quote[] = "-"; $quote[] = "+"; $quotes[] = "-"; $quotes[] = "+"; $randomquote = rand(0, count($quote)-1); $randomquotes = rand(0,count($quotes)-1); //eg1 //2y-x+3=0 printf("$y y $quotes[$randomquotes] $x x $quote[$randomquote] $z = 0"); ?> </td> </tr> Solving the randomised equation (this is the problem): <tr> <td> <? $a= $y * ($quotes[$randomquotes]$x); print("$a"); ?></td> </tr> I am successful with all the randomized result but i cannot get PHP to recognize that the randomized operator (addition and subtraction) are actually real operators not just some symbol. Attached is the script for your perusal. Thank you...
  13. Hi Guys, I need some help with the update feature in MySQL. I have a set of tables but i need to update only some values in each row most of the time. NOT the entire row. When i tried: $sql="UPDATE jjrc SET pbl='$pbl', pa='$pa', noc='$noc', con='$con', cmn='$cmn', ce='$ce', hst='$hst', tp='$tp', fmt='$fmt', lvl='$lvl', sbj='$sbj', nou='$nou', amt='$amt', ctr='$ctr', dti='$dti', di='$di', sub='$sub', fp='$fp', ec='$ec', ac='$ac', app='$app' WHERE id= $pin"; it works fine. However when i tried: $sql="UPDATE jjrc SET sub='$sub', fp='$fp', app='$app' WHERE id= $pin"; All other values that i do not want to update went blank after the update!!! I only need to update `sub`, `fp` and `app` from time to time. Could there be an extra syntax? Pls help guys
×
×
  • 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.