Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. try serialize and unserialize <input type="hidden" name="address_array" value="<? echo serialize($address_array); ?>"> $address_array=unserialize($_POST['address_array']);
  2. it was supposed to be "fromslashes". I made a typo. It gets all the records in "fromslashes" that are between today and today + 5 days
  3. you should always use the datetime data type for dates. You can then change the format in your query if you need to. with addslashes as a datetime select * from events where user='".$_SESSION['USER']."' and addslashes between '".date("Y-m-d H:i:s")."' and '".date("Y-m-d H:i:s", strtotime("+ 5 days"))."'";
  4. substr $variable=substr($row['TaxID'],-4); to get the first part $variable=substr($row['TaxID'],0,-4);
  5. Sweet. Now you'll want to read up on LEFT and RIGHT Joins. It will save you headaches if you have to do much more in the way of joins.
  6. I guess I misunderstood I thought he wanted it to happen when they clicked the checkbox.
  7. you can't do what you're wanting to do with php only. You have to have some javascript involved.
  8. it will require either onClick posting it or onClick combined with ajax. onClick='this.form.submit();' then checking for the post and doing whatever you need to with the database.
  9. close. I forgot the FROM. But that should be close.
  10. if landordid in the landlord table is the primary key you don't need the limit 1. Also if the landlord can only have 1 capitalsquare you can do a unique key on the landlordid and capitalsquareid. Then you can do a join SELECT * UsersGeneral JOIN LandLord on UsersGeneral.LandLordID=LandLord.LandLordID JOIN MapSquares on LandLord.LandLordID=CapitalSquares.LandLordID WHERE UsersGeneral.Username='$name'
  11. more of a mysql question. But you'll want to use a UNION $sql = "SELECT first_name,surname,gender FROM names where surname=$input_surname and gender=$input_gender UNION select 'default_firstname' as first_name, surname, 'default_gender' as gender from more_names WHERE surname = $input_surname ORDER BY surname ASC"; you may have to tweak it some and it hasn't been test yet. But that should point you in the right direction.
  12. what version of php are you using?
  13. if I understand what you're asking this would do it <ul> <li> <?php echo ($mypageVariable=="deathValue")?"<a id='uberlink2' href='#'>DeathValley</a>":"<a href='bio_deathvalley.php'>DeathValley</a>"; ?> </li> </ul>
  14. $query = mysql_query("SELECT * from `page` WHERE id='$pg'") or die(mysql_error()); if(mysql_num_rows($query)) ==0) { header("Location: your404page.php"); exit; } $row=mysql_fetch_array($query); // The rest of your code here
  15. you have single quotes around the variable you're using as a keys. Either this isn't mean to be a variable in which case you need to drop the $ or you need to lose the single quotes. PHP doesn't parse variables in single quotes.
  16. you should change your database structure. Storing comma separated values isn't a good idea store each number as a separate row header column a | header column b | header column c bla bla bla | more bla bla | 1 bla bla bla | more bla bla | 2 bla bla bla | more bla bla | 4 bla bla bla | more bla bla | 8 etc then delete from table where columnc in(1,2)
  17. you forgot the "from" DELETE FROM image plus there's single quotes around the 9,10 where there shouldn't be.
  18. you have an extra single quote before $enquiryid
  19. you'll have to do a hidden field with your customerid. When you post you're not passing through the URL so you're losing your variable. <input type='hidden' name='customerid' value='".$_GET['Customer_ID']."'> then you'll have $_POST['customerid'] available on the page you posted to.
  20. I'm retarded and didn't see the PREPARED in bold. Ignore my post.
  21. you can query the information_schema for your table SELECT * FROM information_schema.COLUMNS where table_name='yourtablename'
  22. where's the html for your form? It could be that the html isn't validating and firefox is a little more forgiving than IE.
  23. It sounds like you haven't created the keys or crypt_gpg doesn't know where to look. Here's a guide to creating and using keys with crypt_gpg http://pear.php.net/manual/en/package.encryption.crypt-gpg.php
  24. you'll need to find out where the binary gpg is and specify it like so $gpg = new Crypt_GPG(array('binary' => '/path/to/gpg'));
  25. use implode $sql = "DELETE FROM messages WHERE id IN (".implode(",",$_POST['delete']).")"; to do it your way it would have to be $list.=$value; // not plus
×
×
  • 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.