Jump to content

Desdinova

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Everything posted by Desdinova

  1. you should check what the log generated.
  2. yeah you're right. php.net explanes it badly. I thought rand(1,30) would create a 30char long random string. thanks:)
  3. This doesn't seem possible with rand(); what I need is, I have say 32 options. I want to select a number between 1 and 32. How should I do this?
  4. maybe you could speed up the query by putting the spiders in categories. say you create a table Spiders. In this table you create columns ID, A, B, C, D through Z every spider gets written down in the col which maches the spiders useragents first char. so basically, you don't have your query searching all fields when checking for a spider, but only checking the col which matches the first char. Think this should at least decrease load and thus waiting time. but if it's a good solution, I don't know really.
  5. what does your print_r($_FILES); tell you? what does your upload form look like?
  6. how can you tell which one is a spider and which is not? if that's easy, why not write the spiders to another stats-tabel?
  7. I was wondering if there are any free-to-use PHPscripts to check if a DNS record is set up properly for a domain. If there aren't any, I'd like to make one myself but I don't know how this would work. I know how to set up DNS, but other than that there's not much I know about checking it. I usually do this through an external site. Anyone who can give me a kick in the right direction?
  8. I believe you can edit mysql.ini or something and allow the root to access without password. however, I'd suggest you reinstall the software. Maybe take a look at WAMP server too. Seems to cut it for me. [edit] delete should be edit, changed it, sorry
  9. try changing class = 2 OR class = 1 to (class = 2 OR class = 1)
  10. say you have domain.com/index.php in index.php you write: echo $gettest; then open domain.com/index.php?gettest=set in your browser. if 'set' is printed, globals is on. if it's not, globals is off. You don't need globals to be on, bad scripting could result in security breaches. Instead, I use 1 file called vars.php which is included in every other PHP script. I put a $values = array ('item1','item2','item3'); in it, followed by a foreach ($_REQUEST as $key => $value){ if (in_array($key, $values)){ $$key = $value; } } what this basically does, for every GET or POST the page receives, it checks if it's in the array $values, and if it it, $_POST['item1'] will be converted to $item1. So you create your own little bit more secure global system ;) also, for every string you insert into a mysql database, you should mysql_real_escape_string(); so: $sqlquery = "INSERT INTO Customer (CUS_NAME, CUS_IC, CUS_COMPANY, CUS_COMPANY_ADDRESS, CUS_COMPANY_PHONE, CUS_HOME_ADDRESS, CUS_HOUSE_PHONE, CUS_HP,CUS_EMAIL) VALUES ('".mysql_real_escape_string($_REQUEST['name'])."','$ic','$company','$caddress','$cphone','$haddress','$hphone','$hp','$email')";
  11. [!--quoteo(post=360984:date=Apr 2 2006, 11:47 PM:name=Pezzoni)--][div class=\'quotetop\']QUOTE(Pezzoni @ Apr 2 2006, 11:47 PM) [snapback]360984[/snapback][/div][div class=\'quotemain\'][!--quotec--] Try: [code]<table width="100%" height="116" border="0" id="head">     <tr> <tr class="mTr"><td><p> </p>     <p>Web site</p></td><td>       <textarea rows="10" name="S1" cols="20"><? echo $profile->web; ?></textarea></td></tr>         </tr> </table>[/code] Also don't forget to do the normal processing you would do on the data for display (stripslashes etc), or things might start getting strange. [/quote] what he said
  12. well you could write it to a txtfile, but I think you'd still be better of to just learn some mysql. It's quite an easy script you're making, so I'm sure a lot of people out here are willing to help you out with it. for starters: Create a database Create a table with 3 fields the fields are: ID (int, autoincrement, unique) Name (varchar, 80) Comment (text) int, varchar and text are fieldtypes. you'll find them as a dropdownmenu in phpMyAdmin. autoincrement is a dropdown item as well, and unique is found in a checkbox. varchar 80 means there's a max of 80 characters to store in that field. Just put the 80 in the field next to the varchar.
  13. are you running this on a database? and if I understand this right, you want to show 4 seasons, and within those 4 seasons all movies that belong to those seasons?
  14. I'm not sure what it is you want exactly, and I haven't worked with do/while loops. What you could try, is to change $arrayselect =, to $arrayselect[] = this way you'd create an array inside an array, not overwriting the data you had.
  15. ok I'm not sure if you're expecting the superglobals to be on. if they're not, you'd have to set your strings with the desired POST, GET or REQUEST data. Try something like this: $sqlquery = "INSERT INTO Customer (CUS_NAME, CUS_IC, CUS_COMPANY, CUS_COMPANY_ADDRESS, CUS_COMPANY_PHONE, CUS_HOME_ADDRESS, CUS_HOUSE_PHONE, CUS_HP,CUS_EMAIL) VALUES ('".$_REQUEST['name']."','$ic','$company','$caddress','$cphone','$haddress','$hphone','$hp','$email')"; see the request? I'm too lazy to fill it in like that at all your fields, but you should see how it handles that. you could use $_POST as well. Do notice that you have to escape the ', thats why I used ".$_REQUEST['something'].". If you don't, you'll get an error.
  16. no, you're mixing things up right now. echo '<img src = \"map.png\">'; you open the echo with ' so you don't have to escape the " meaning, either use echo '<img src = "map.png">'; or echo "<img src = \"map.png\">"; if the flashfile isn't working this is probably because it can't be found.
  17. do you have a login script? and do you want this query to be for PHP?
  18. an option would be to store the files at a dir where only the server can reach through absolute paths (ie same level as your HTML dir). Then store the filename in the database, along with the userID. if your login script is very secure, your PDF files are very secure.
  19. well I see a few options.. one is get an onclick event on the submit button opening a page which gives you the var. one is get a page collecting the data, doing your stuff, then continue with a header location through get. one is get a page collecting the data, filling it into a hidden form, doing your stuff, then body onload submit form. however, none of these I consider to be 'neat'. Aren't there any other ways you can think of?
  20. echo "<img src=\"bla.png\">"; thats a way that works and the flash file probably doesn't work because you've only used the EMBED tag. Try opening the page in firefox/netscape/opera. I believe they listen to EMBED. IE does not. Not sure though. IE uses PARAM.
  21. [!--quoteo(post=360940:date=Apr 2 2006, 08:31 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ Apr 2 2006, 08:31 PM) [snapback]360940[/snapback][/div][div class=\'quotemain\'][!--quotec--] You got single quotes around action which won't work. I'm pretty sure you meant to use backtick marks (i.e. `action`). The use of fetching by object should have no bearing on the outcome. Slack, it's best to use mysql_fetch_assoc() instead of mysql_fetch_array() when you're going to use $row_rsAction['Call_ID'] syntax. The mysql_fetch_array() will work fine though because it creates numeric as well as associative column name indexes. [/quote] even better yet, there aren't supposed to be any quotes around the table. so "SELECT * FROM table"; should work fine.
  22. ok well it looks ok. could you paste the parsed HTML sourcecode? (you know, open it in the browser, right click, view source)
  23. ok, just for the fun of it, place a border in the table. does the table itself look ok? or a bit twisted? and this is the exact code of what you are using?
  24. try this: $query_rsAction = "SELECT * FROM 'action'"; $rsAction = mysql_query($query_rsAction, $connClient) or die(mysql_error()); while($row_rsAction = mysql_fetch_array($rsAction)) { echo $row_rsAction['Call_ID']; echo '<br>'; } if it doesn't work, try this: $query_rsAction = "SELECT * FROM 'action'"; $rsAction = mysql_query($query_rsAction, $connClient) or die(mysql_error()); while($row_rsAction = mysql_fetch_object($rsAction)) { echo $row_rsAction->Call_ID; echo '<br>'; }
×
×
  • 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.