Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. Another extension that is not going as planned!!! I have c:/php in my system path so I have placed the libmcrypt.dll in c:/php I have uncommented the extension=php_mcrypt.dll phpinfo says mcrypt is enabled BUT when I try to use it using the following code [code] $str = "piughisdauhf pukbn;jbpiusxmdouihc ;noh ;[oc jdfhous ;jndf ;jhoucxh' hi"; echo $str; srand((double) microtime() * 1000000); $iv_size = mcrypt_get_iv_size(MCRYPT_SAFER128, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $crypt = mcrypt_encrypt ( MCRYPT_SAFER128 , 'lebataclan' , $str , MCRYPT_MODE_ECB , $iv ); echo $crypt; [/code] I get the following errors.. piughisdauhf pukbn;jbpiusxmdouihc ;noh ;[oc jdfhous ;jndf ;jhoucxh' hi Warning: mcrypt_get_iv_size(): Module initialization failed in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 151 Warning: mcrypt_create_iv(): Can not create an IV with size 0 or smaller in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 152 Warning: mcrypt_encrypt(): Module initialization failed in C:\Program Files\Apache Group\Apache2\htdocs\ngc\admin\shop_ordermanager.php on line 160 What am I missing? Thanks in advance
  2. Ok this is boring me now.... here is the relevant html... [code] <form action="/delegate_reg.php" method="post" enctype="application/x-www-form-urlencoded" name="delreg" id="delreg"> <div id="dcont"> <div class="deldiv" id="del0"> <label for="name[0]"><span class="req">*</span>Delegate Name:</label><input type="text" name="name[0]" id="name[0]" value="" /><br /> <label for="phone[0]"><span class="req">*</span>Telephone:</label><input type="text" name="phone[0]" id="phone[0]" value="" /><br /> <label for="fax[0]">Fax:</label><input type="text" name="fax[0]" id="fax[0]" value="" /><br /> <label for="email[0]"><span class="req">*</span>Email:</label><input type="text" name="email[0]" id="email[0]" value="" /><br /> <div style="clear:both"> <label for="address[0]"><span class="req">*</span>Postal Address:</label><textarea name="address[0]" id="address[0]"></textarea> <label class="indent"><input type="radio" name="correspondee" value="0" checked="checked" />Use as Correspondee</label><br /> </div> <label for="postcode[0]"><span class="req">*</span>Postcode:</label><input type="text" name="postcode[0]" id="postcode[0]" value="" /><br /> </div> <div class="clear"></div> </div> <a href="javascript:tccAddDel();" title="Add Image">Add Another Delegate</a> <br /> <input type="submit" class="bttn" name="submit" id="submit" value="Next" /> </form>[/code] and here is the relevant css... [code]form#delreg { width: 765px; } #delreg.deldiv { border: 1px solid #939598; } #delreg label , #delreg input , #delreg textarea { margin: 5px 10px; clear: right; } #delreg label { float: left; clear: left; width: 130px; text-align: right; } #delreg .bttn { margin: 10px; } label.indent { float: none; display: inline; }[/code] what I want is the 'use as correspondee' radio button to display on the right of the textarea. You will also notice that IE pushes the postcode text input down past the textarea and radio button where as FF doesn't. Its driving me mad!!! OH the url if you want a look [url=http://www.buildingschools.co.uk/delegate_reg.php]http://www.buildingschools.co.uk/delegate_reg.php[/url]
  3. You choices are a fixed width site (which would normally be around 765 wide and defeat your goal here.) a fluid layout - mainly the central content having the fluid width which you have described or detection with js - requires js so don't rely on it! all you can do ther is either redirect to a screen width specific section of your site or do some css switching - both of which require vastly more amount of work in maintainence than just using the fluid witdh (which IMO is your best bet)
  4. Improvement on teh above... [code]<?php $qrystr = NULL; foreach($_POST['local'] as $local){ foreach($_POST['visit'] as $visit){ $qrystr .= "('$local', '$visit'),"; } } if (!is_null($qrystr)) { $qrystr = substr($qrystr,0,strlen($qrystr) - 1); $qry = mysql_query("INSERT INTO table(local,visit) VALUES " . $qrystr); } ?> [/code] Only using one query then....
  5. you can use php to develop js or you can use ajax for js to execute some php code on the fly.
  6. ???? big int should manage a 20 digit number no probs
  7. $sql = "SELECT * stats WHERE stats.id=$_COOKIE[id]"; change to $sql = "SELECT * stats WHERE id = " . $_COOKIE[id];
  8. javascript can do it but you need to load everything into the page first - ajax lets you update on the fly. Alternatively if you don't mind the user having to have css on then you could simply hide/show divs so it look slike the options change
  9. If you are wanting these variables to pass on to yet another page then you have to put them somewhere - either in a session var or echoing them out into html as hidden inputs.
  10. Sorry man! I am still not sure what you're trying to achive. can you put links or screen shots up?
  11. What is wrong with just using teh left border? you need to check you html there are two unlcosed div tags in there!
  12. I it is passed in the url to the script. The fact that your header is not getting $pd_id suggest that $_GET['pd_id'] is empty - therefore it is not in the url. ARe you POSTING this value to that script? if so use $pd_id = $_POST['pd_id']
  13. without reading all that - the easiet method of creating the array you want is to simply give all the checkboxes the same name and set the value to the id of the activity. HTML will auto make an array if you use name="event[]" value="<?php echo $event_id; ?>" />. the in the processing script you just need to loop through this array like so... foreach($_POST['eventid'] as $key => $val) { } beauty of checkboxes (and radio boxes) is that if they are not checked then they are not set...
  14. looks like  register_globals.... make sure that you have $page = $_GET['page'] somewhere before that switch.
  15. it would appear that $_GET['pd_id'] is not being set!!!
  16. Not totally sure what you are trying to achive here only thing you can do is to use clear:right but that will clear any floated element to the right of course. Maybe put up a link or screen shots of what you are trying to achieve
  17. hmmmm... I was sure I had read somewhere but can't find it now.  Still I think it best to leave the 'behaviour' of the mouse on screen well alone - incase users expect something from it and its just to point over an element but won't do anything.
  18. try altering your if to this.. if (($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg") && $_FILES["file"]["size"] < 30000) Also make sure that your file input is called 'file' (sometimes the most obvious thing is overlooked ;))
  19. or date_diff or anything else on there that you think will meet your needs.
  20. If that is true then the if statement is not satisfied with the file that is being offered it. Check what is echoed out and compare it to your requirements.
  21. try not to use a table for displaying forms. Use purely css and creat a style sheet for both the 'screen' and 'handheld' media. That way you have one page that will serve both devices.
  22. if you don't mind using an extra query (its pretty fast anyway) the time/date calculations are best done in mysql - much better/reliable support in mysql than php. [url=http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html]http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html[/url]
  23. Good morning everyone. I am looking for some good technical articles regarding ip addresses, proxy servers, anonymizer, ip address spoofing etc. I am redeveloping a shopping cart and want to record as much accurate information as possible so that in the case of any fraudulent transactions I have some information that will be as useful as possible to trace the perp. Many thanks in advance.
×
×
  • 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.