Jump to content

koencalliauw

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

koencalliauw's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [quote author=almightyegg link=topic=113778.msg462932#msg462932 date=1162664914] hmm...i found one that i thought could help...so i changed the file permissions to -rw-rw-rw- but it still shows: Warning: mkdir(/home/lordofth/public_html/images/players/21) [function.mkdir]: Permission denied in /home/lordofth/public_html/activate.php on line 27 [/quote] You should make sure that safe_mode in your php.ini is turned off if possible. Next you should check that the directory that you want to have write permissions in, has the permissions 775, the owner your user and the group should be the group that runs apache (type 'groups apache' to find out in a terminal). Also, when you are relying on a hosting provider, check with them if they haven't disabled some functions (like mkdir).
  2. I don't think this can be done, a while ago I tried something along those lines, but didn't find anything.
  3. [!--quoteo(post=369489:date=Apr 28 2006, 09:48 AM:name=apit)--][div class=\'quotetop\']QUOTE(apit @ Apr 28 2006, 09:48 AM) [snapback]369489[/snapback][/div][div class=\'quotemain\'][!--quotec--] browsing other website throught our php script...how to do this [/quote] You could try an html iframe and set the src tag for the iframe using php: [code] $site_to_browse = "http://www.google.com"; echo "<iframe src='" . $site_to_browse . "'></iframe"; [/code]
  4. what features do you want it to have? Koen.
  5. Could you give us the SQL query? also, could you check in the HTML source if the table gets ended correctly (</table>)? Koen
  6. You probably should do something to check if the result set for your query is correct (if there is no sql-error, that is): [code] $sql="select * from employees"; $res=@mysql_query($sql); if($res!=FALSE) {     echo mysql_num_rows($res); } else {     echo "There was an error in your SQL query: " . mysql_error() . "\n<br />The given SQL query was: " . $sql; }[/code]
  7. I can see you are getting the pid from the querystring, I can follow so far, but then you make a sql query, but you don't do anything with it. If I assume correctly, the empRef is a field in you database, so you would have to do the following: [code] if (isset($HTTP_GET_VARS['pid'])) {       $query ="SELECT * FROM airticketbooking where empRef='$HTTP_GET_VARS[pid]'";     $result = mysql_query ($query) or die (mysql_error());     $row = mysql_fetch_array($result);     echo "Employer RefID: " . $row["empRef"]; } [/code] or if you just wanted to display the pid that you have in the hyperlink, you could just do: [code] if (isset($_GET['pid'])) {       echo "Employer RefID: " . $_GET["pid"]; } [/code] Koen.
  8. try this: [code] <?php $arr = array('milk','eggs','bread'); foreach ($arr as $value) { $mailbody="$value\n\n"; mail("me@myself.com", "testing 123", "$mailbody", "From: Myself<me@myself.com>"); echo "<p>$value</p>"; } ?> [/code] .= means it appends a value to the previous value so the behaviour you had is normal. Probably your arguments for the foreach loop were correct, but this is simpler I think.
  9. I agree, but given the error mysql produces, it is however most probably this that produces the error, not to mention that it is horrible coding practice to not specify the fields (suppose you do this everywhere in your script and you need to add a field to your table, you would need to recode all your queries as this can only be used if the value count is the same as the total field count for the table)
  10. the correct syntax for the insert query is: insert into mytable(field1,field2) values(value1,value2); you forgot the (field1,field2) part. Koen
  11. You don't need php to do this, you need javascript/css 1. create a div that contains all your comments, give it an id or a class that you refer to in your css file <div id='comment'> comments go here </div> 2. in the css, set 'display: none;' for the div that contain comments 3. create a button on your page 4. add the onclick event (javascript) to the button <input type='button' value='show comments' onclick="document.getElementById('comment').style.display=block;"> this is all from the top of my head, I usually keep javascript language reference nearby. If you want to do some other things or just to keep things readable in your code, you could create a function that doest the same. <input type='button' value='show comments' onclick="showcomments()"> <script type='javascript'> var comment = document.getElementById('comment').style; comment.display = 'block'; </script> Warning: this will NOT create the slider effect, you need something like on [a href=\"http://script.aculo.us\" target=\"_blank\"]http://script.aculo.us[/a] for that, don't ask me questions about it, cos I just know it exists, never used it
  12. Hi, thanks for replying, I'll post the upload script here when it's done. Koen.
  13. anybody have any ideas on how to upload large files decently using (preferably) only php?
  14. if you do not want to write the code yourself, take a look at this: [a href=\"http://www.phpclasses.org/browse/package/2779.html\" target=\"_blank\"]http://www.phpclasses.org/browse/package/2779.html[/a]
  15. take a look at the vars: session.cookie_lifetime session.cache_expire in your php.ini, cookie_lifetime is 0 by default I think (session expires when user closes browser), cache_expire is less important but take a look at it anyway.
×
×
  • 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.