Jump to content

robert_gsfame

Members
  • Posts

    876
  • Joined

  • Last visited

Everything posted by robert_gsfame

  1. I mean instead of having this way : page.php?user=abc&npage=page2 to be rewritten into abc.mywebsite.com/page2, i wish to have my page2.php?user=abc and rewritten into abc.mywebsite.com/page2 Possible or not??
  2. sorry i forgot to put echo <?php echo $row['image_location'];?>
  3. I'd like the background:url(/images/services.gif) no-repeat bottom left #3a3535; to change like this...background:url('<?php $row[image_location]; ?>' ) no-repeat bottom left #3a3535; But it's not working. Like I said, I have that in my css file...which is included like any other css file. I've even tried setting the background as a <div style=background:url('<?php $row[image_location]; ?>' )> but that didn't work either. No images show up at all. have u tried to change this background:url('<?php $row[image_location]; ?>' ) into this background:url('<?php $row['image_location']; ?>' ) see the bold single quotes
  4. u mean get the background path which has been stored in database? if it's that what u mean then u can get the background path from your database make sure that background image has been uploaded into your local folder n <body <?php echo "background='mybackground.jpg'";?>>
  5. I just wonder if it is possible to have this let say i have page called: page.php?user=abc then i rewrite url so that users have their own subdomain "abc.mywebsite.com" what if in page.php, there is a link which will redirect user into another page called page2.php?user=abc is it possible to have this on url : abc.mywebsite.com/page2 using mod rewrite? thx
  6. U want to have it in loop?? while($dd=mysql_fetch_array($penaltypoints)) { .. <input type="hidden" name="warnID" value="'.$dd['warnID'].'"> .. safe_query("UPDATE table SET column='".$_POST['name']."' WHERE warnID='".$_POST['warnID']."'"); } <--then the bracket should be placed here
  7. not sure what u re looking for... u mean this $selectquery=mysql_query(sprintf("SELECT * FROM usertable WHERE username='%s' AND password='%s'", mysql_real_escape_string($_SESSION['username']), mysql_real_escape_string($_SESSION['password']))); $selectquerynum=mysql_num_rows($selectquery); if(empty($selectquerynum)){ header("Location:login_fail.php");}
  8. if i am not wrong....you have two $result
  9. u could try this Assume i have put all filetype($filetype) and filename($filename) in my database $array=mysql_fetch_array($myquery); $upload=$array['upload']; $filetype=$array['filetype']; $mimeType = $filetype; header('content-disposition: attachment; filename="' . $upload . '"'); header('content-type: ' . $mimeType); header('content-length: ' . filesize("foldername/{$upload}")); readfile("foldername/{$upload}"); Hope it helps....
  10. yeah...but when u register, u have done the checking part...so (!empty($count)) or ($count==1) is the same
  11. try changing this--> $sql="SELECT * FROM $tbl_name WHERE firstName='$name' and password='$password'"; into this--> $sql="SELECT * FROM $tbl_name WHERE firstName='$name' AND password='$password'"; and this--> if($count==1){ session_register("name"); session_register("password"); header("location:loginSuccess.php"); } into this--> if(!empty($count)){ session_start(); $_SESSION['name']=$name; $_SESSION['password']=$password; header("location:loginSuccess.php"); } let see if it works
  12. how can i ignore the capital letter, let say $firststring="a"; $secondstring="A"; if(($firststring)==($secondstring)){ echo "Same letter!"} thx
  13. Single quotes missing %s should be '%s'
  14. Let say i have <a href=bla.html>Click here</a> When user put their cursor on "click here", at the bottom of firefox browser will appear link information which is bla.html...how can i hide or rename it?
  15. Assume there are 3 users with different image (JPG) size *400x100 *200x200 *100x400 and i display the image in 130x130 <img src="xx" height=130 width=130> then how can i adjust each images so that fit 130x130 but without being stretched.. i mean if the image is rectangle then it will appear as rectangle but only the size percentage will be adjusted thx
  16. have u tried onunload <head> function clearform() { document.getElementById("textfield1").value=""; } </head> <body onunload=clearform()> <form name="form1" method="post" action="form2.php"> <input type="text" id="textfield1" name="textfield1"> <input type="submit" value="submit"> </form> </body> not yet tested but
  17. I have this small problem var dt = new Date(year, month-1, day, 0, 0, 0, 0); dt.setDate(dt.getDate() + 1); when i display the result in both browser i get some small problem IE: Thu Jun 24 00:00:00 UTC+0700 2010 FF:Thu Jun 24 2010 00:00:00 GMT+0700 (SE Asia Standard Time) so how can i get this date format 2010-06-24 As i am still newbie, i use split() but as IE and FF give different result...i get confused now Can anyone help? thx in advance
  18. if i dont want to use $_GET or cookies or Session can i still do this?
  19. How can i pass the value $_POST after executing a query and redirect it using header() Assume: <?php $id=$_POST['id']; $deletequery=mysql_query(sprintf("DELETE FROM table1 WHERE id='%s'", mysql_real_escape_string($id))); if($deletequery) { header("Location:index.php"); } ?> is it possible to get the $_POST['id'] value in index.php thx
  20. $string=strtotime("Y-m-d",2009-05-08"); date("Y-m-d",$string) i thought i cant use less or more tag(<)(>)...solve!
  21. How can i check whether the date is in the past or still in the future and echo the result $string=strtotime("2009-05-08"); date("Y-m-d",$string) thx
×
×
  • 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.