1. $_SESSION Use

    Date: 03/26/12     Keywords: php

    I have some php 4 code that is being tested on a php 5 site. The (fairly simplistic) login uses a $_SESSION variable to track a valid login, but under php 5 it seems to lose its values when moving to a different php page.

    A quick scan of the documents didn't show anything obvious about version 4 vs version 5 differences. The code uses session_start(), then checks $_SESSION['loginstuff_notactualkey'] for the user name.

    Is this a coding practice that should be changed with version 5?

    Source: http://php.livejournal.com/683431.html

  2. Converting MS-Access Forms To PHP

    Date: 09/26/11     Keywords: php, database, sql, microsoft

    I've got a Microsoft Access application that I'm going to have to convert to PHP and another database (PostGres or SQLite). The db portion I could do by hand if I needed to (the tables are not complicated). It's the forms that I'm worried about.

    Does anyone have any experience with a tool for converting Access forms to PHP code? I found DB Convert, which looks promising, but I'd like to know about anyone's first-hand experiences.

    Source: http://php.livejournal.com/682814.html

  3. Small problem with autoplay

    Date: 05/24/11     Keywords: web

    I am using a video plugin for my site but one of the videos from veoh keeps going to autoplay, so I was wondering if I could get a small bit of help since this is old and the developer is no longer updating this plugin. I want to put a new piece of code to stop the autoplaying into the video embedder plugin.

    My embedded video:

    embed src="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=v5.6.0.1123&permalinkId=v20995555PJT9Qaah&player=videodetailsembedded&videoAutoPlay=0&id=2895821" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="410" height="341" id="veohFlashPlayerEmbed" name="veohFlashPlayerEmbed">

    The part I found for the plugin to work:

    case 'veoh':
    $content = wp_widget_video_buildEmbed('http://www.veoh.com/videodetails2.swf?player=videodetailsembedded&type=v&permalinkId='.$id.'&id=anonymous', $width, $height);

    Thank you in Advance.

    Source: http://php.livejournal.com/682396.html

  4. Inkwell Creative Hiring Web Developer

    Date: 02/11/11     Keywords: programming, css, html, technology, database, web, seo

    Inkwell Creative, a growing Portland, Oregon company focusing on web design, graphic design, interactive media, video and branding, is looking to hire a web developer. We are seeking a hard working team player and someone who is forward thinking when it comes to technology. You must be able to work with us in a collaborative team setting, know many coding and web programming languages and have a strong portfolio.

    5+ years of experience
    Strong portfolio
    Must be collaborative
    Knowledge of many coding/web development languages
    Knowledge of CSS and HTML 5, Content Management Systems, Flash, SEO programming, Integration into Databases
    Knowledge of iPhone apps a plus

    DOE. Benefits and paid-for parking. This is a salary position.

    Email a cover letter, resume and link to your online portfolio to hr@inkwellgroup.com. Please include in your cover letter any outside hobbies, passions and interests. We kindly request no phone calls and no employment agencies.


    Source: http://php.livejournal.com/681768.html

  5. Favorite web development editors

    Date: 01/02/11     Keywords: php, programming, css, html, web, linux


    I am starting to dabble in web programming, again, after a long hiatus. I am a Debian/Linux guy, and am hoping some folks that do web development can recommend or share which web development editors and tools they have used, liked or disliked.

    I tend to use vi/emacs for programming, but think to do web site development a 'dreamweaver' or other similar tool, that helps organize and edit pages and text files for PHP, HTML, CSS, and JS would probably be better than vi or emacs :)

    Let me know, and thanka.

    Source: http://php.livejournal.com/680974.html

  6. You can string functions together in PHP!

    Date: 11/11/10     Keywords: no keywords

    Does anybody know when that happened?

    I just stumbled across it out of sheer desperation when I was using DOMXPath to access the text value of several single nodes:

    $title = $xpath->query ('title', $ent)->item (0)->textContent;

    I'm absolutely certain that when I first started (4.0? 3.x?) this was illegal since you could not follow a function call with any operator on the return value. The parser simply did not allow it and so the above code could only be written:

    $nodelist = $xpath->query ('title', $ent);
    $node = $nodelist->item (0);
    $title = $node->textContent;

    Of course, they didn't have objects then but the same was true of arrays:
    $myFunction ()[0] was illegal, now it's not.

    Source: http://php.livejournal.com/680758.html

  7. Differences between the web and cli?

    Date: 10/18/10     Keywords: php, apache

    I have a script that's working 100% fine when viewed as served by Apache. When I run it from the command line (i.e. php index.php) I get a DB connection error. Everything is the same, but when run from the command line it doesn't work. Any ideas on differences between the two methods of running the script?

    Source: http://php.livejournal.com/680454.html

  8. OCPortal

    Date: 06/24/10     Keywords: no keywords

    Anyone had any experience with OC portal?

    Source: http://php.livejournal.com/679656.html

  9. Calendar script

    Date: 06/06/10     Keywords: php

    I'm looking for a calendar class or script that will drop into an existing application, where I can tell it where to find events, and it will populate these events on the given day in a month view.

    Every php calendar I've looked at so far has it's own date tables.. I'm really only needing the "shell" of the calendar.

    Is there something like this available, or should I start writing my own?

    Source: http://php.livejournal.com/678943.html

  10. Parsing stray greater/less than symbols in HTML

    Date: 06/02/10     Keywords: html

    $str = "

    This is a test. This test is > that test, but is less than < the other test. The previous test may be

    [Error: Irreparable invalid markup ('') in entry. Owner must fix manually. Raw contents below.]

    $str = "

    This is a test. This test is > that test, but is less than < the other test. The previous test may be than the third test. The fourth test may be < the first, but > than the last. This is the end of the test string.


    Need to identify and convert the legit, non HTML greater/less than signs to ASCII.. I'm running out of ideas, especially with the substrings:

    The previous test may be < the second test, but is likely > than the third test.
    The fourth test may be < the first, but > than the last.

    Anyone have a suggestion or hint on how to accomplish this?

    Source: http://php.livejournal.com/678754.html

  11. ASCII Convert issue

    Date: 04/16/10     Keywords: php, database, sql

    I have a person's name with a non-standard ascii character in it (š) and am having trouble converting to back to ascii to retrieve their record.

    The url string contains: mašalaitis
    But PHP reads it as: mašalaitis

    So, my SQL is basically not finding what is stored in the database (former) with what the querystring contains (latter). I'm trying to use ORD() based on the specific value that š outputs (154) and add � to the beginning, and ; after.

    But, this is what it shows when I loop through the whole name:

    109 = m
    97 = a
    197 = �
    161 = �
    97 = a
    108 = l
    97 = a
    105 = i
    116 = t
    105 = i
    115 = s

    Any help is greatly appreciated.

    Source: http://php.livejournal.com/677993.html

  12. Startup is looking for developers (Moscow, Russia)

    Date: 04/14/10     Keywords: no keywords

    Hi there!
    Hope developers from Russia are reading this community, cause we're looking for great professionals in Moscow. Even got special prizes for them. We're the team of Russian startup tournament called Harvest@GreenfieldProject. It'll be held on 17th-18th of April in Moscow. So if you're from Russia, pls read the text below and join our event!

    Разработчики – самые дефицитные специалисты в стартапах. Поэтому на новом Harvest (РИФ+КИБ edition) мы создали вам особые условия.

    Harvest (РИФ+КИБ edition) – стартап-турнир, на котором за 2 дня можно успеть то, что не получалось доделать месяцами. Победившая команда получит полностью оплаченную поездку на учёбу в летней бизнес-школе Ignite в Кембридже (Англия).

    17-18 апреля пройдёт отборочный турнир для стартапов любой степени готовности: от задумки, презентуемой впервые, до развитого проекта, которому не хватает рук. Как советует Ричард Брэнсон «К черту все! Берись и делай!»

    Участники выберут лучшие идеи, представленные в формате elevator-питчей, разобьются на команды и при поддержке экспертов проработают концепцию и бизнес-модель, создадут прототип и инвестиционный тизер.

    Выходные – лучшее время, чтобы поработать над проектом собственного бизнеса. Или найти проект, к которому захочется присоединиться. Harvest – это площадка, на которой можно “и себя показать, и других посмотреть”: найти единомышленников, бизнес-партнёров, обменяться контактами с будущими заказчиками или потенциальным боссом.

    Финалиста определят 23 апреля на Объединенной конференции РИФ+КИБ 2010. Чтобы пройти в финал, нужно сделать summary готового проекта на английском. А затем пройти телефонное интервью с представителем Кембриджского университета. Знание языка очень пригодится.

    Второй приз — участие в любой образовательной программе Start in Garage на ваш выбор.

    Подробная информация и регистрация участников на сайте стартап-турнира: http://harvest.greenfield-project.ru/
    Цена участия для разработчика составит всего 600 р. Снизить её еще на 20% можно, оплатив через интернет.

    Тем, кто зарегистрировался, достаточно приехать 17 апреля с ноутбуком, знаниями и опытом в МФПА на “Семёновской” (100 м. от метро). Остальное – интернет, питание, аудитории и интересных экспертов – обеспечит команда организаторов.

    Source: http://php.livejournal.com/677873.html

  13. poplating a dropdown list

    Date: 03/29/10     Keywords: database

    I am creating a database that records people's work activities and want to use drop down menus to clean up the values they enter. They get paid based on their activities and roles, so I don't want a lot of user error.
    Right now, I'm using the same table for people to add or edit their entries, and people could say if a conference they went to was, for example, university, national or international in scope.
    The code right now is:
    " size="60" />
    How do I add a drop down menu to this that still calls the existing value (if one exists) but allows them to add or edit other selections?

    Source: http://php.livejournal.com/677556.html

  14. Detect change in Radial Buttons

    Date: 03/22/10     Keywords: no keywords

    I have a project where people can select from a variety of items.
    When they’ve made a selection, I reduce the number of items available in a separate table that keeps count.

    Now I want to make it so that the user can edit his/her decision later.  That requires me to be able to (re)add items to the count that are no longer wanted/needed, and reduce the number of the new item taken.

    I’ve been using radial buttons in a form, because it only allows one item (of several) from each group of items.

    It’s easy for me to repopulate the form, and then update the user info…
    ….but I can’t wrap my head around how to detect a change from one item to the next so I can update my count.

    ???  Thanks for any insight you can provide.

    Source: http://php.livejournal.com/677289.html

  15. array_count_value

    Date: 02/14/10     Keywords: no keywords


    Is it possible to rank array_count_value() in order of... count?


    $array = array(1,1,2,2,2,3);

    It would output, in this order: 2, 1, 3 because 2 has the highest frequency.

    Thanks in advance!


    Source: http://php.livejournal.com/676928.html

  16. My variables are getting mixed up --RESOLVED (I'm an idiot)

    Date: 02/14/10     Keywords: no keywords

    If I run the the code below, I get an unexpected result.
    I would expect
    Instead I get:---and I don't understand why.  Anyone able to help?

    --------------------------------- code snippet below ------------------------------

    $SixPM_form = "Camping";
    $SevenPM_form = "Nation";
    $EightPM_form = "First";
    $CampingSixPM = "33";
    $CampingSevenPM = "32";
    $CampingEightPM = "31";

    if ($SixPM_form = "Camping")
        $UpdateCampingSixPM = ($CampingSixPM - 1);
    if ($SevenPM_form = "Camping")
        {$UpdateCampingSevenPM = ($CampingSevenPM - 1);
    if ($EightPM_form = "Camping")
        $UpdateCampingEightPM = ($CampingEightPM - 1);

    echo $SixPM_form;
    echo $SevenPM_form;
    echo $EightPM_form;
    echo $CampingSixPM;
    echo $CampingSevenPM;
    echo $CampingEightPM;
    echo $UpdateCampingSixPM;
    echo $UpdateCampingSevenPM;
    echo $UpdateCampingEightPM;

    Source: http://php.livejournal.com/676671.html

  17. Open PDF in browser, not "Save As"

    Date: 01/22/10     Keywords: browser

    My users want an option to open stored PDFs in the browser window instead of being prompted to download the file.

    Current code:

    			header('Content-Description: File Transfer');
    			header('Content-Type: application/octet-stream');
    			header('Content-Disposition: attachment; filename='.basename($file));
    			header('Content-Transfer-Encoding: binary');
    			header('Expires: 0');
    			header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    			header('Pragma: public');
    			header('Content-Length: ' . filesize($file));

    How would I write the headers to allow files to open in the browser window?

    Source: http://php.livejournal.com/676531.html

  18. Build Array from Checkboxes in Form

    Date: 01/14/10     Keywords: web

    I’m helping with a web form that has a lot of selectable options.
    (There must be 70 different items that can be selected by the user, in any number of combinations.)

    These are represented as check boxes in the form.

    I’m wondering if there is a way to create an array of all the selected items without having to check each one individually, and adding it manually.

    I suppose I could make a function to do all the hard work…but I’d still have to call that function for each and every checkbox item.  Seems inefficient.

    Any ideas?

    Source: http://php.livejournal.com/676320.html

  19. Question about file uploads

    Date: 01/04/10     Keywords: no keywords

    Wow, I'm posting a lot lately!

    So I'm working on a script that will upload files to a server. Is there a way to specify what user the script uploads as, or am I just stuck with uploading as the "nothing" user?

    I know I can chown it after the fact, but that just doesn't seem to work well.

    Also, if I use chmod() on a directory, will the permission change also apply to all files within the directory?


    Source: http://php.livejournal.com/675722.html

  20. Question about Arrays

    Date: 12/31/09     Keywords: no keywords

    Hi guys, another dumb question!

    Do things like in_array and array_search work properly in multi-dimensional arrays? Also, is there a way to specify which elements in a multidimensional array to check?


    Source: http://php.livejournal.com/675394.html

  ||  Next page

antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home