Jump to content

Darkness1427

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Darkness1427's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. heyy you know how to work mkdir() code = <?php echo dirname( __FILE__ ); if(!file_exists("/nate")){ var_dump(mkdir("/nate", 0777)); } ?> it not printing anything to screen which suggests that /nate exists but cannot find the physical folder anywhere in my site directory
  2. i fixed it thanks, it was the / for some reason it didnt like them so i just replaced them with -, crude but it works, thanks for the help
  3. thanks for pointin that out, i have incorporated this into my code but i still get the same error even thoigh i choose an option in the available drop down it returns an error saying i haven't. i have followed the script all the way through and it is identical to the property type script except for it having the availibility options etc.
  4. heyy i have a page with a fair sized form and two dropdown boxes (select options), for the php validation i am quite simply using if($_POST['boxOne'] == 0){ $errors[] = ""; } the boxes dont have labels so the first <option> is the title/label with a value of 0 so this should catch that, works fine for one but not for the other. any ideas. the files ascoiated with the problems are failry hefty ones so if you want to view the entire code just ask, else this is the code in question. <tr> <td height="30"></td> <td height="30"> <input type="text" name="minPPW" class="propertyHalfInput" placeholder="Min PPW" value="<?php echo $form->value("minPPW") ?>"/> * [b]<select name="available" class="propertyDropDownHalf" id="available"> <option value="0">Available For</option> <option value="11/12">2011/12</option> <option value="12/13">2012/13</option> <option value="13/14">2013/14</option> <option value="14/15">2014/15</option> </select>[/b] * </td> <td width="10" height="30"></td> <td height="30" colspan="4"> <span>TV Subscribtion:</span> <input type="hidden" name="billTV" id="billTV" value="0"/> </td> <td width="5" height="30"></td> <td width="25" height="30"> <input name="billTV" type="checkbox" id="billTV" value="1" /> </td> </tr> <tr> <td height="30"></td> <td height="30"> <input type="text" name="maxPPW" class="propertyHalfInput" placeholder="Max PPW" value="<?php echo $form->value("maxPPW") ?>"/> * [b]<select name="propType" class="propertyDropDownHalf" id="propType"> <option value="0">Property Type</option> <option value="House">House</option> <option value="Flat">Flat</option> <option value="Halls">Halls</option> </select>[/b] * </td> <td width="10" height="30"></td> <td height="30" colspan="4"> <span>Internet Subscription:</span> <input type="hidden" name="billNet" id="billNet" value="0"/> </td> <td width="5" height="30"></td> <td width="25" height="30"> <input name="billNet" type="checkbox" id="billNet" value="1" /> </td> </tr> and if($_POST['propType'] == 0){ $form->setError("type", "* The property Type is required"); } if($_POST['available'] == 0){ $form->setError("available", "* Availability is required"); }
  5. thanks for the quick reply ill try this straight away
  6. hey, new to forums so hi everyone. im trying to create a system in php ad mysql where users can add details about properties, but to break down the table i have two tables one that is about the overall property and a table for individual rooms, the rooms are linked to the main table with a propertyID my question is, is it possible to retrive the property ID at the same time as a new property is being inserted? the property id is automatically assigned by mysql on insertion and is an auto increment field. so it will be the last row in the table if that helps. Hope someone can help, Nate p.s if it would help if i posted the table structures just holla and ill upload them.
×
×
  • 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.