-
Posts
1,008 -
Joined
-
Last visited
Everything posted by spiderwell
-
How can I join a dropdown from another table?
spiderwell replied to spacepoet's topic in PHP Coding Help
the code you have given doesn't add categories at all, only UPDATEs or SELECTs from the gallery table. to make it easier you should have 2 pages, one for adding categories and one for adding the photos. on the categories page have a simple for with one field for the name of category, have it post to itself, and insert the name into the gallery category table in the database. on the other page you have the form like the one you posted, only you don't appear to have an INSERT just UPDATE so you will only be editing existing records, unless you change that script to have an option to add new records also. -
mike without knowing exactly what code you have, there isn't much anyone can suggest. how are you accessing the emails in the first place, I would imagine that whatever method you are using would have a way to access email properties including attachments, sorry not a great reply but you haven't given more than a vague description to respond to.
-
you could use file write functions to achieve this, and rewrite the config.php file when the user submits the form.
-
list can be used in conjunction with explode quite nicely to place results into seperate variables rather than arrays. or they also work well with recordsets as shown in the php.net page under list() <?php $mything = "12-06-2011";//english date as I'm from UK list($day,$month,$year) = explode("-",$mything); ?> way I see it, if you know what they do, and can't find a use for it, you probably don't need it, its not something I use.
-
Storing data in an array? Is this the best way?
spiderwell replied to slaterino's topic in PHP Coding Help
an array is definitely the right way to store this sort of information if you require to use it again later in the script, more likely nested arrays, just to make it even more fun for you! -
$id = "action"; $string = $_GET["$id"]; god know what you are trying to do there. use this $string = isset($_GET['action']) ? $_GET['action'] : 'index'; that says if there is an 'action' variable, pass its value to $string, else $string = 'index'
-
callate la boca?
-
yeah this is what I thought was going to be the case, I think I'll advise him to get a bigger memory one though as hes not at all computer orientated, and doesn't even have a pc or mac! shame as plugging in a hard drive/memory stick would have been brilliant, but guess thats why they designed it with 3 memory sizes, maximise the product profit and all that
-
hey peeps my mate has a ipod, and is looking to get an ipad, and i was telling him to get a 16gb one to save money and buy an external hard drive and link the two so he can get lots of downloads on the external drive. I just found out that ipads dont have usb ports! Does anyone here have experience with ipads and know if you can link them to a hard drive or has Steve Jobs(worth) made them purely mac dependent ergo my idea is not going to work? Would you need a mac as a central device? I don't really have a clue on mac stuff. thanks
-
too many innuendo-istic responses, none of which are really that funny.
-
Yes.. I'm sure Denise Richards wants to have a baby with you. that's great news! do easyjet fly to usa?
-
this isnt the correct way to use buttons, if you want to use like that, why not use an image instead? a backgrounded bevel image with text overlayed will keep accessibility good too
-
i think the sql isnt quite right, perhaps you need it like this: "SELECT * FROM zxt_friends WHERE (user_id = '{$u['id']}' OR friend_id = '{$u['id']}' ) AND approved = '1'" putting brakets around the OR
-
Issue in Self Options adding of Question..
spiderwell replied to ArkeologeN's topic in PHP Coding Help
this sounds fasinating, perhaps you can share the code that you have already and we can then point you in the right direction. from your description it sounds like javascript will be involved to produce dynamic changes to the form. -
Code works fine in PHPMyAdmin but doesn't work in PHP
spiderwell replied to Gotharious's topic in PHP Coding Help
hey good to see this got sorted, i had to go last night. and as above, the function will have been defined more than once for that error to occur -
Code works fine in PHPMyAdmin but doesn't work in PHP
spiderwell replied to Gotharious's topic in PHP Coding Help
in the function getHotel, at this line: echo "<table>"; before it put echo $sql . "<br />"; and it will show you exactly what is passed into the sql. very good for working out why things dont work! do the same thing in the pagenation bit too, so you can see what is going on in that section and why the count works, but the hotels are wrong. -
please mark this solved to avoid anyone else coming along and having a heart attack when reading the thread
-
it removes 'space' either end of a string, just put trim() around $stringData as he said. space being a line break or a space.
-
Code works fine in PHPMyAdmin but doesn't work in PHP
spiderwell replied to Gotharious's topic in PHP Coding Help
$hotelObj -> getHotel($where); this line of code, whatever it is you are passing, will never be used in the function getHotel due to this line in the function: $where = isset($_POST['where']) ? $_POST['where'] : ""; so you have a function you pass a variable to it, that immediately get surpassed by the POST variable or set to ''. thats a very odd thing for starters. i believe also that name is a restricted word in mysql, so put `backticks` around it, just in case please re write this so i can understand it: -
do you actually mean you want to create a thumbnail image of the original?
-
i want world peace, can php and mysql do this?
-
mines of my future daughter's mother
-
hehe fugux is the new pr manager for w3schools. you could also do it without jscript, and have it all handled by the PHP, but you would have to have a pre form, for want of a better phrase, which asked how many people, then when posted, it would spit back a form with the correct number of entries for the number of people selected, based on the number in the pre form
-
it worked locally but not on the live site? check the connection details