Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. I have no experience with IIS, but this isnt the problem. Could you post what you used to install PHP. Did you use the installer or the zipped bineries package? If you used the installer then that has a few files missing from it. Instead download the Zipped Bineries and extract the contents of the zip file to where you have installed PHP to, overwritting any existing files. Also make sure PHP is using the correct php.ini file by creating a  file called info.php and add this init: [code=php:0]<?php phpinfo(); ?>[/code] Now run that file, look for the [b]Configuration File (php.ini) Path[/b]. Look to the right of that and it should state the full path to your php.ini. Is that path correct? I dont know whether this applies to IIS, but when modify the php.ini restart the server.
  2. This is the wrong forum for asking this. The Core PHP Hacking forum is not for getting with hacking PHP sites/scripts. This forum is for getting help with developing PHP further or creating extension for PHP. Thread closed
  3. Okay could you provide the following information: 1. What Operating System does your server run on 2. What is your server running, Apache or IIS Also could you provide information about how you have setup PHP, and post here any tutorials you have followed to install PHP
  4. I dont think you want to use $_POST['userid'] as you havn't got the users userid from the database. I think you might want to rethink the logic of your code. As to me it appears to be all over the place.
  5. No, its not that code thats the problem but the code you use to call the cleanMemberSession function. Post the code here that you use when the user registers.
  6. Try this: [code]<?php $x = isset($_GET['ticket']) ? $_GET['ticket'] : ''; if(!isset($_POST['submit'])) {     echo <<<HTML <form method="post" action="test.php?ticket={$x}">   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="250">     <tr>       <td width="14"><input type="radio" value="1" name="option"></td>       <td width="236">         <b>Website</b><br>         Info about website.       </td>     </tr>     <tr>       <td width="14"><input type="radio" value="2" name="option"></td>       <td width="236">         <b>Testing</b><br>         Testing purposes.<br>       </td>     </tr>     <tr>       <td width="14"><input type="radio" value="3" name="option"></td>       <td width="236">         <b>Other</b><br>         Other queries not listed above.<br>       </td>     </tr>   </table>   <input type="submit" value="Post Ticket" name="submit" style="width: 80; height: 22"> </form> HTML; } else {     if($x == 'submit')     {         echo 'submit_ticket<br /><br />';         switch($_POST['option'])         {             case 1:                 echo 'Option 1';             break;             case 2:                 echo 'Option 1';             break;             case 3:                 echo 'Option 3';             break;             default:                 echo 'Error: Option unavailable...';             break;         }     }     else     {         echo 'Error: Ticket function does not exist.';     } } ?>[/code]
  7. For your secound question use floats rather than adsolute/relitive positioning. This [url=http://www.456bereastreet.com/lab/developing_with_web_standards/csslayout/2-col/]2 coloumn CSS Layout[/url] explains just that.
  8. Could you post some code here. Prehaps you'll want to use valign="top" within the <tr> tags, so each row aligns to the top of table cell.
  9. No problem. Glad you got there in the end.
  10. [quote]2) again using the above var and an if statement if($_SESSION["username"]){ echo "logout link"; }else{ echo "log in link"; } [/quote] I'd use if isset like so: [code=php:0]if(isset($_SESSION["username"])) {     echo "logout link"; } else {   echo "log in link"; }[/code]
  11. $_SERVER['PHP_SELF] retrieves the relative path to the servers document root (the main directory your files get uploaded to for your website). If you want to have your sites url prepended before $_SERVER['PHP_SELF'] use: [code=php:0]$url = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; // now $url holds the url and the location of the script echo $url;[/code]
  12. Post your code here. Also add [code=php:0]or die(mysql_error());[/code] to end of the mysql_query function. That way if there is a problem with your query, you'll get an error message returned from MySQL explaining why.
  13. When you call the cleanMerberSessions function do you call it like this: [code=php:0]cleanMemberSession($row["username"], $row["password"], $row["userid"]);[/code] Also is the fields that stores the user id number called [b]userid[/b] within the user table?
  14. I'm not sure, but prehaps [url=http://www.mysql.com/products/tools/query-browser/]MySQL Query Browser[/url] is what you'll looking for.
  15. Ooh, thats why i couldn't see RockingGroudon's layout in the website critique forum. I apologise RockingGroudon for to close your thread if no link was provided to critique.
  16. Please read the [url=http://www.phpfreaks.com/forums/index.php/topic,10395.0.html]Freelancing Guidelines[/url]
  17. [quote]pm me if you want the job[/quote] That wont be possible as the PM system is disabled. For now I have moved this to the Third Party PHP scripts forum.
  18. Do you mean do something likje this: [code=php:0]<?php if(isset($_GET['test'])) {     echo $_GET['test']; } ?> <a href="test.php?test=hello">Test</a>[/code]
  19. What happens if you use this as the function: [code=php:0]function draw_admin_menu($menu, $team) {     global $logged; // define the $logged variable as global so we can access them from within the function.     //if($logged['username'] && $logged['level'] == $team)     //{         $html = '<center>Welcome <b>' . $logged['username'] . '</b></center><br /><br />' . $menu . '<br /><br />';     //}     echo $html; }[/code] Do you get any output. Also where is the $logged variable being created to?
  20. Do you get this type of error: [b]Fatal error: Call to undefined function mysql_connect() in [path of script here] on line [line number here][/b] if you do and you have PHP5 installed on a Windows server, have a read of [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this FAQ[/url] if you are on a *unix box you'll want to recompile PHP5 with the --with-mysql command option.
  21. If you want to run a PHP scriupt when you click a link/button/image without the user being sent to the PHP script itseft you'll want to use AJAX. AJAX is javascript, but it allows you to called server side scripts in the background without having to reload the page. Check out [url=http://www.ajaxfreaks.com/tutorials/1/0.php]this introduction[/url] tutorial over at ajaxfreaks.com
  22. You'll wwant to give each checkbox the same name but prepend the name square brackets like so: checkbox[] that way any tickboxes that are checked get send as an array, which will help to produce your dynamic query. ALso you'll wan to give the checkbox a different value, say for checkbox1 use the value 1, for next checkbox give it a vlaue of 2 etc. Heres a demo: [code=php:0]<?php if(isset($_POST['submit'])) {     $sql  =  'SELECT * FROM `table` WHERE (`list_number` = ';     $sql .= implode(' OR `list_number` = ', $_POST['checkbox']) . ")";     echo '<code>' . $sql . "</code><br /><br />\n"; } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">   <?php for($i = 1; $i <= 10; $i++) {     echo "<input name=\"checkbox[]\" type=\"checkbox\" value=\"{$i}\" />&nbsp; &nbsp;Checkbox{$i}<br />\n  "; } ?>   <input type="submit" name="submit" value="Generate Query" /> </form>[/code]
  23. Well you can submit the form to mypage.php, then use cURL to sends the post'd data to paypal.
  24. OKay change this: [code]$query="SELECT username, password FROM users WHERE username='$username' and password='$password'"[/code] to: [code]$query="SELECT userid, username, password FROM users WHERE username='$username' and password='$password'"[/code] and change this: [code]function cleanMemberSession($username, $password) {[/code] to: [code]function cleanMemberSession($username, $password, $userid) {[/code] Now add [code=php:0]$_SESSION['userid'] = $userid;[/code] after [code=php:0]$_SESSION["loggedIn"]=true;[/code] Your code should now get the userid.
  25. I dont see no layout. Wheres the layout? Have you removed it? If you have, then I'll close this thread as theres nothing to critique
×
×
  • 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.