Jump to content

jimfog

Members
  • Posts

    1,803
  • Joined

  • Last visited

Posts posted by jimfog

  1. I am trying to put a function as an argument of another function bit the IDE(Netbeans) highlights it as an error-I cannot understand why. Here is the code:

    function output_header($admin=false,output_header_list()) { ?><div id="header">         <div><a href="http://localhost/Appointments/Administrator/"><img src="Images/logo.png" width="307" height="32" /></a></div>  </div><?php

    What can be wrong here? output_header_list is the function I am trying to use as an argument.

  2. I use netbeans with xdebug and the behavior of the debugger at some point is becomes weird,, I cannot explain it. Here is what what happens: I press the step into button(at the debugger toolbar), or some of the other buttons and then the debugger "stops". When I mean stops, ALL the buttons on the toolbar(except the STOP button) becomeinactive. What might be causing that? I did not use any breakpoints. Here is the code where I am trying to use the debugger:

        require_once 'userauth_admin.php';	  		   $username=$_POST['username'];		   $passwd=$_POST['password'];   if(!filled_out($POST)){echo 'hi ';}	  

    I hope I was clear.

  3. I read your post.So in essence you want to build an e-shop.Questions arise, for example:Will you target only India, or other countries also?What is your competitive advantage in relation to other sites who sell the same stuff?Are you the one who has drawn these paintings.Can you give me a link of a similar site so I can have a grasp of what you are about to sell?Other questions will come later-for now let us focus on the above.

    • Like 1
  4. Yes, like so:header('Content-type:text/html;charset=utf-8');
    Well, when birbal mentioned the above it did not crossed my mind that he was referring to a specific PHP function.Are the headers set to deafault UTF-8?
  5. I prefer Fiddler with IE, but any HTTP debugger will do - Firebug's NET tab, Opera's Dragonfly, etc.
    Ok, the question is can alter the charset setting related with the headers? With the meta is easy, it is just a matter of HTML code of the page. Regarding the database is also easy, use mysqli_set_charset or other code for that matter.
  6. Header('Content-type:text/html;charset=utf-8'); Or you can use meta tag.
    Is it possible that I can see in the source of a webpage the charset info related to the headers?I can only see the meta tag
  7. The meta charset affects the display of your web page if viewed offline. When users view it online, the HTTP headers are used instead, but when offline, if you don't have a charset meta, the browser will fallback to its default, which is more than likely not what you're after.
    I really did not know the above. Then the next q comes natural-at least for me.How can I affect/alter the charset type of the headers?
  8. You are absolutely right, mysqli_set_charset does the job.I have 2 questions though: Why is it better than set names?SO after using this method(mysql_set_charset) is it necessary that in the webpage that database functions are we also use in the header

    [/size][/font][/color][font="verdana, arial, helvetica, sans-serif"][color="#000066"][size=3]<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    Or the above is for another reason there(related with the charset again)and should leave as it is?

  9. Use phpMySQL to connect with your old MySQL installation that uses those files. Export. Then connect phpMySQL to new MySQL server and import.
    How, PMA is under hdocs, when I start it, it connects with the mysql server which has been installed under program files-how I can make PMA connect with the mysql files that are somewhere else in the system?
    The topic has been skirting around something that you probably don't want to hear. If you deleted your old MySQL installation before exporting the files then IMO there is a good chance you will not be able to recover them. There may be a small chance that you can reinstall your old MySQL and have access to the old files..
    IF the files are permanently lost I have my alternatives-no need to mention them mow
    Why didn't you export them when you had the chance? And why didn't you back them up? (Same thing as exporting.).
    As I said above I have my alternatives
  10. CORRECTION: I meant the old MySQL files(data etc...) You say to export them, how?I must use a tool, what tool? PHPMyAdmin DOES not connect with these folders-these folders are just somewhere in my system.I remind that these files are myi, frm files. Could I use mysqldump?

  11. Here is how the situation now, I managed to found in my system the old PHPMyAdmin installation. So now we have the new PHPMyAdmin installation under Apache24/htdocs(in which I want to import the database) AND the old PHPMyAdmin folder/files somewhere in my PC, not in htdocs-along of course with MySQL tables i wish to import in the NEW PHPMyAdmin. Given the above what can I do? I have not installed yet Mysql server 5.1. I want to see what can we do with what we have in our hands now.

  12. I have concluded in a code that prints that days of a month(format('j')). Actually I want to make the calendar have a month view as Ms-Outlook has.The only issue is that I am trying to find an efficient way to to make the row change every 7 days. here is the code:

    <table id="month"> <?php    for($fstdmonth;$fstdmonth<=$lstdmonth;$fstdmonth->modify('+1 day')->format('d'))	    {	    echo  '<div class="monthday" >'.$fstdmonth->format('j').'</div>';		 if($fstdmonth->format('j')==6 )//this is just for testing	    {echo '<br>';}	 	    }	?></table>

    Tell me what you think about the above-do you think is a good way for printing the days of the month ANDwhat do you suggest for creating a separate row for every days?

  13. I installed MySQL separately-till now I had it as a part of XAMPP. So I have kept the old MySQL files where in it(in a data file) the tables exist which I wish to import to the new installation. As far as I know in order to import a table into MySQL(I use PHPMyAdmin) it must be an sql file. Nonetheless, in the old NySQL installation the files that contain the tables that I want to import have extensions like .frm and MYI. I tried to import these but could not. I get this message actually:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'รพรพ' at line 1

    What can I do?

    • Like 1
  14. Let me guess, you downloaded the DLL from ApacheLounge? ('cause that's what I ended up doing just yesterday...)
    Exactly-although I do not understand why this file is not included in the php 5.4.4 installation.
  15. Yes boen robot, that worked, thanks very much. Second, the code worked with a previous version of PHP I had. I wonder if the reason it does not work with PHP 5.4.4(the one I just update to) it is because maybe there were changes in the relative time formats syntax

  16. I have already done that:

    date.timezone = "Europe/Athens"

    Before I fixed the above I was getting many errors related to date functions in the script.Now the only errors left are the one mentioned in this topic.

  17. The code you are going to see below was working fine before updating to PHP 5.4.4:

    $now = new DateTime($newdate);//the code below depicts last and first day of month$fstdmonth=clone $now;$lstdmonth=clone $now;$fstdmonth->modify('first day of month');$lstdmonth->modify('last day of month');

    I am trying to get the last and first day of a month.Now here is the error message I get upon running the script:

    Warning: DateTime::modify(): Failed to parse time string (first day of month) at position 13 (m): The timezone could not be found in the database in C:\Apache24\htdocs\Appointments\Frontend\output_functions.php on line 47

    Any ideas why this might happening?

×
×
  • Create New...