Jump to content

Greaser9780

Members
  • Posts

    326
  • Joined

  • Last visited

    Never

Everything posted by Greaser9780

  1. Could possibly be a spam issue. I think comcast has lots of spam protection. Did it make it to the bulk folder by chance?
  2. I am trying to create a series of if statements. If the var is equal to null it should update the db. If it is not equal to null and has a value it should go to the next if statement. I have tried if ($var = 'NULL") and it always lets me write to the db even if there is a greater value there. I have tried if($var == 'NULL') and it never lets me write to the db no matter what value is in the db. I have also tried each of these with = '0' instead of null. Any suggestions?
  3. It's kind of ironic. In my second dropdown I list a value for each one. I changed everything I could think of on the first one except for that.
  4. Fenway, You are the Fn man. Wow do I feel alot better now. And as usual, it's always the simple things that screw something up for me.THX for putting up with my incessant cries to get this figured out. I can't believe it even ran like it did in FF.
  5. I have tried dozens of mehtods for this. I run an alert to describe the xmlhttp. In firefox it returns "object xmlhttprequest" in IE all I get is "object". The odd part is that I get no errors. I checked all of my browser settings and everything is ok. I even updated to IE7 which should show it just as FF but it doesn't. The following is my .js file: var xmlHttp function showUser(str) { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } alert(xmlHttp); var url="showUser.php" url=url+"?q="+str url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("txtHint").innerHTML=xmlHttp.responseText } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { //Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } This is supposed to bring up another dropdown box with the info from the first one. It only brings up the dropdown box with empty options. IT's like it creates an object but isn't passing all the info. showUser is the function that set the var q. It gets added where it says url="?q="+str str is the value of the first dropdown. I just can't figure out why this doesn't work in IE but it does everywhere else even netscape. I even have the added number to stop the cache issue.
  6. It works in netscape as well with no errors. I tried an alert to show the object. I get the same in netscape and firefox XMLHttpRequest as object. But when I run it in IE I just get "object". Is it possibly my browser settings?
  7. I get alert showUser.php?q=. If I put quotes around the +str the alert shows showUser.php?q=str When I do the same in firefox with the alert I get showUser.php?q=RB or whichever I choose. It's like the showUser function doesn't work properly in IE
  8. The problem I can see is that in IE the value of q is not read by the next script. It doesn't make sense to me as to why it won't. I currently get no object type of error. The only error I do get is a small error symbol at the bottom of my browser. A little yellow ! in a triangle. I ran it in firefox. It works and I get no errors in the console other than css errors and that's only due to where the files currently reside. I can't even echo $q in IE so I know the problem is that IE won't get the value. It does however display the next dropbox like it's supposed to. It's just empty because I use $q to pull data with a query.
  9. You could run a query in your guestbook page looking for the users id and using the $_SESSION['username'] to get the id. Then in your script that posts the data in the guestbook add an extra td to insert the id.
  10. well if intro has php in it save it as a .php file in the same directory as your index. If it's only html save it as such and place it in the same place. Just make sure that whatever you name it (.php,.html) you include that where you have ?=intro .
  11. You could do this with php but considering all the links on that page you might be better off trying to get a javascript that makes all links active or inactive depending on user status. Why not just send paid members to a different page. If user id matches database include("page2.php") or if userid doesn't match db include("page3.php"); which you could just copy and paste the other page and disable the links. Would probably be faster. Plus you could add another statement as to why they should join.
  12. Personally I think a bright almost neon purple would do good.
  13. You can use include(),require(), or header() to send someone to another page.
  14. <form action="#" method="POST"> <input name="button1" type="submit" value="image" src="http://www.newcomedy.net/imgs/button_01.gif" /> </form> <form action="#" method="POST"> <input name="button2" type="submit" value="image" src="http://www.newcomedy.net/imgs/button_02.gif" /> </form> <br><br> <?php if(isset($_POST['button1'])){ echo "Button1 was pressed"; }else{ if(isset($_POST['button2'])) echo "Button2 was pressed"; }else{ echo "None of the buttons were pressed"; } ?>
  15. probably because submit had to be executed if it called this script.
  16. First select page: <html> <head> <script src="selectuser.js"></script> </head> <body> <div align="center"> <form> <select name="users" onchange="showUser(this.value)"> <option>QB <option>WR <option>RB <option>TE <option>K <option>DF </select> </form> </div> <div id="txtHint"> </div> </BODY> </html> You already have the .js script And here is the second dropdown page: <?php $q=$_GET['q']; include("db.php"); $sql="SELECT name FROM players WHERE position='".$q."' ORDER BY name ASC"; $result = mysql_query($sql); ?> <html> <head> </head> <body> <form action="select.php" method="post"> Comment:<input type='text' name='com' maxlength='80'><br> <select name="playername"> <?php while($row = mysql_fetch_array($result)) { echo "<option value='" . $row['name'] . "'>" . $row['name']."</option>" ; } ?> </select> <input type="submit" name="submit" value="select"> </form> </body> </html> I thought the showuser function used at onchange sent (this.value) to the .js file as the (str) in the function description and was included with the url as url=url+"?q="+str . So I figured the value of q was equal to the choice that the user made. If I am wrong in this please chow me where I went wrong and give an opinion of how to fix it.
  17. Good to know. Didn't know mysql had a built in function for it.
  18. I clicked buy on an object. Then clicked basket and got this: Unknown column 'f130a53ab648ec88a58852b726433470' in 'where clause'
  19. Such as: if ($submit == 'true' && ($name == '' || $email == '' || $msg == '')) { $nomsgerr = "<span class=\"msg\">Please enter your information<br />in all fields marked with *.</span>"; }
  20. $userid = $_GET['id']; $con = db_connect(); $sql = "SELECT * FROM nexus_users WHERE userid = '$userid'; $result = mysql_query($sql,$con); $row = mysql_fetch_array($result); $cStatus = $row['cStatus']; if ($cStatus == "p"){ $tb_stat="Active PRO Member"; }else{ $tb_stat="ACTIVE FREE Member"; } echo $tb_stat; This is how I would do it providing you are not posting the information to this page. If the userid gets posted to here from a form then it's a different story. This is also assuming that cStatus is in the db.
  21. If the value is kept as a timestamp in the db then pull both out with a query. Convert them with strtotime(). Then do the math. $timeleft = ($exptime-$timenow); $time = ($timeleft / 86400); echo "You have $time day(s) left";
  22. Try putting: $userid=$_GET['userid']; Before the query. Then use $userid in the query.
×
×
  • 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.