• Member Avatar for cereal
    cereal

    Began Watching do word wrap function include '\' in string while wraping?

    Hello, I have a string $string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] - [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For both cases,look for a value named “InstallLocation” containing the string “\Hewlett-Packard\\”, either delete or clear this value and"; and i …
  • Member Avatar for cereal
    cereal

    Liked / Shared do word wrap function include '\' in string while wraping?

    Hello, I have a string $string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] - [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For both cases,look for a value named “InstallLocation” containing the string “\Hewlett-Packard\\”, either delete or clear this value and"; and i …
  • Member Avatar for cereal
    cereal

    Replied To a Post in do word wrap function include '\' in string while wraping?

    Add the fourth parameter and it will cut the word: wordwrap($string, "80", "<br>", true); * http://php.net/wordwrap
  • Member Avatar for cereal
    cereal

    Began Watching Facebook javascript error

    Every page of DaniWeb has a Javascript error that says: Uncaught SecurityError: Blocked a frame with origin "http://www.daniweb.com" from accessing a frame with origin "https://www.facebook.com". The frame requesting access has …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP coding error-Need help

    Hi, Your script is almost correct but the `session_start()` must be in the first line of the script. So, if for example you're doing everything in the same script, you …
  • Member Avatar for cereal
    cereal

    Gave Reputation to ebanbury in edit_profile Form Issues

    Thank you!! That is the simplest issue!! I've just been staring at it for so long.....Awesome! Many thanks.
  • Member Avatar for cereal
    cereal

    Replied To a Post in how to add youtube id to embedded youtube vedio

    The pattern in the preg match is missing the dash `-`, it should be `[a-zA-Z0-9_-]`, so change the first to: '/(https|http):\/\/(.*?)\/([a-zA-Z0-9_-]{11})/i' And the second to: '/(https|http):\/\/(.*?)\/(embed\/|watch\?v=|(.*?)&v=|v\/|e\/|.+\/|watch.*v=|)([a-zA-Z0-9_-]{11})/i' Because in case of …
  • Member Avatar for cereal
    cereal

    Stopped Watching username or not?

    So I'm creating an online system. Just wondering should I allow for users to have a username or just use their email address as the primary logon? What are your …
  • Member Avatar for cereal
    cereal

    Replied To a Post in analyzing and understanding SQL code

    This: CASE WHEN minpart=0 THEN CAST(hourpart as nvarchar(200))+':00' ELSE CAST((hourpart-1) as nvarchar(200))+':'+ CAST(minpart as nvarchar(200))END as 'total time' is a statement, like `if-then-else`: * http://technet.microsoft.com/en-us/library/ms181765.aspx if the **minpart** (stands for …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP 5.4 to 5.3 compatability

    In addition check also this link: http://php.net/migration54
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to echo html code in php echo

    **@Ine_1** Hello, in practice you have to escape the quotes of the html code. If you use double quotes then you can write: echo "<span class=\"smile\">hello</span>"; Notice how the class …
  • Member Avatar for cereal
    cereal

    Began Watching username or not?

    So I'm creating an online system. Just wondering should I allow for users to have a username or just use their email address as the primary logon? What are your …
  • Member Avatar for cereal
    cereal

    Replied To a Post in edit_profile Form Issues

    Exactly, as I wrote in my last post, check line `796`: $reg_contact_h = mysqli_real_escape_string($dbc, trim($_POST['reg_contact_h'])); $reg_contact_m = mysqli_real_escape_string($dbc, trim($_POST['reg_contact_m'])); And then line `1018`: <tr> <td class="mainans">Contact Details*</td> <td> <label for="rqst_contact_h"></label> …
  • Member Avatar for cereal
    cereal

    Replied To a Post in edit_profile Form Issues

    Maybe I got it: the name in the input field is `rqst_contact_h` while the script searches for `reg_contact_h` in the POST array and the same happens with `reg_contact_m`. So this: …
  • Member Avatar for cereal
    cereal

    Stopped Watching Single Store CRM application to Multi Store CRM

    My company has Desktop application developed in vb.net using devexpress controls. Back End database is MySQL. Company is in retailing and have 2 retail stores in in same city. Both …
  • Member Avatar for cereal
    cereal

    Began Watching Single Store CRM application to Multi Store CRM

    My company has Desktop application developed in vb.net using devexpress controls. Back End database is MySQL. Company is in retailing and have 2 retail stores in in same city. Both …
  • Member Avatar for cereal
    cereal

    Gave Reputation to matrixdevuk in Search

    mysql_* are deprecated. PDO is worth learning, and it's more secure than mysql_*.
  • Member Avatar for cereal
    cereal

    Gave Reputation to Tpojka in Allow only specific domain for email.

    isset(in_array(end(explode('@', $mail)), array('disallowed.tld', 'notwanted.tld'))) ? 'noPe' : 'yuP'; //or if (in_array(end(explode('@', $mail)), array('disallowed.tld', 'notwanted.tld'))) { echo 'We don\'t want your registration here.'; } else { // define('ADMIN', $mail); }
  • Member Avatar for cereal
    cereal

    Replied To a Post in edit_profile Form Issues

    Ok try to do the same with the integer columns, since you're using prepared statements you can avoid `mysqli_real_escape_string()`.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Allow only specific domain for email.

    Hi **ignnniter**, just a suggestion: `strpos` can lead to the same problem of the `strstr` approach, because it will check only for the first occurrence. Tpojka suggested `preg_match` which is …
  • Member Avatar for cereal
    cereal

    Replied To a Post in share

    You can use the **Open Graph protocol**: * http://ogp.me/ For example: <html prefix="og: http://ogp.me/ns#"> <head> ... <meta property="og:title" content="Title of this page" /> <meta property="od:description" content="Once upon a time..." />
  • Member Avatar for cereal
    cereal

    Replied To a Post in edit_profile Form Issues

    Regarding the integers it seems all fine. Are you allowing negative integers? Because if the integer column in the database is unsigned the negative value will be translated to `0`, …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Safety without payment?

    Hi, you can do it on your own, read this: * http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html It explains all the steps to create your own certificates and CA.
  • Member Avatar for cereal
    cereal

    Stopped Watching Best way to iterate object 'collections'

    Hi, I've got a class in PHP with an array of objects in it. I need to loop through these objects and call 2 methods on them but I'm not …
  • Member Avatar for cereal
    cereal

    Replied To a Post in extract data from gmail

    I'm sorry, I don't know if there is a tool that can do exactly this, search on Google, maybe you can find something that exports the messages to XML and …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Search comma seprated or single value

    In MySQL you can use a *fulltext search*. Create an index with `skill` column: alter table skills add fulltext skillindx(skill); then you can use queries like this: select * from …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Allow only specific domain for email.

    Not even because, according to the [RFC3696](http://tools.ietf.org/html/rfc3696#section-3) an email like this one: test\@mydomain.com@evil.org is still a valid email address.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Allow only specific domain for email.

    **@matrixdevuk** be careful with this solution, because `strstr()` will check only for the first occurence of the searched pattern, so if I submit something like this: mydomain.net@evil.org it will pass …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to use preg_replace to hide parts of title (or str_replace) idk

    If these titles are in database table then you could run an update query to remove them, for example if you have a table like this: CREATE TABLE `lyrics` ( …
  • Member Avatar for cereal
    cereal

    Replied To a Post in extract data from gmail

    I did not tested with Gmail but check the Mailparse library: * http://www.php.net/manual/en/book.mailparse.php
  • Member Avatar for cereal
    cereal

    Stopped Watching Counting elements in multiple expanding arrays

    I have a question that may be a bit complicated, so let me set it up with what I am working with first. I am dealing with a 3 x …
  • Member Avatar for cereal
    cereal

    Replied To a Post in php mail function not working with gmail

    Not sure if this is related but there are transmission rates, if you send more than 150/200 mails in 15 minutes to the same domain you can get blacklisted. Each …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Laravel pass variable to redirect

    This: return Redirect::route('worktable1.show', $data); Will redirect the request to another method. In your **routes.php** file you should have something similar to this: Route::get('/page/{guid?}', array( 'uses' => 'WorktableController@getPage', 'as' => 'worktable1.show' …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Laravel pass variable to redirect

    Have you defined the variable in the method of the controller? For example: public function getPage($guid) { $data['guid'] = $guid; return View::make('page.form', $data); }
  • Member Avatar for cereal
    cereal

    Replied To a Post in Possible Bug?

    > Yes, that can happen if there's a glitch in downloading our javascript file. Because once it downloads once, it gets saved locally, if you have a corrupted version of …
  • Member Avatar for cereal
    cereal

    Began Watching Best way to iterate object 'collections'

    Hi, I've got a class in PHP with an array of objects in it. I need to loop through these objects and call 2 methods on them but I'm not …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Possible Bug?

    Maybe this can be helpful: if I try to refresh the page, after a failed submit, like right now, the browser asks me if I really want to reload the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Possible Bug?

    > After you posted your reply, did you immediately see your message show up? And then you refreshed the page and it was gone? In my case no, it never …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Possible Bug?

    I had the same issue this morning (more or less when mattyd reported the problem), I was posting my reply in the PHP forum, the page reloaded but my post …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP MySQL remove weekends from query

    It can be done also at query level by using `dayofweek()`. Differently from PHP the range is `1-7`: 1 for sunday, 7 for saturday, for example: select * from images …
  • Member Avatar for cereal
    cereal

    Replied To a Post in ModSecurity - PCRE limits with no Regular Expressions

    Which version of modsecurity module are you using? What I can suggest, for the moment, is to try to reinstall the module by using the newer version. Also, the modsecurity …
  • Member Avatar for cereal
    cereal

    Replied To a Post in ModSecurity - PCRE limits with no Regular Expressions

    Ok, what is missing here is the rule that generates the error, between `Rule` and `execution error` there should be the rule id and the filename in which this is …
  • Member Avatar for cereal
    cereal

    Began Watching Counting elements in multiple expanding arrays

    I have a question that may be a bit complicated, so let me set it up with what I am working with first. I am dealing with a 3 x …
  • Member Avatar for cereal
    cereal

    Replied To a Post in ModSecurity - PCRE limits with no Regular Expressions

    Hi! If your current errors are the same of the above (Aug 2013) there are also few permissions errors, maybe Apache cannot write/read to those DBM files?
  • Member Avatar for cereal
    cereal

    Replied To a Post in Link underline

    > cereal I think. Confirmed. > Come back with your posse and then we'll talk. lol!
  • Member Avatar for cereal
    cereal

    Replied To a Post in migration issue MySql to Postgre

    True, in this case the documentation is not very clear. But the second argument can be omitted if you pass only the first one: $row = pg_fetch_array($movie_file_result); this is possibile …
  • Member Avatar for cereal
    cereal

    Replied To a Post in migration issue MySql to Postgre

    The `pg_fetch_array()` function takes 3 arguments, not 2, so change it to: while ($filesrow = pg_fetch_array($movie_file_result, NULL, PGSQL_ASSOC)) Documentation: * http://www.php.net/manual/en/function.pg-fetch-array.php Bye!
  • Member Avatar for cereal
    cereal

    Gave Reputation to Robert Rusu in Separating front-end and back-end using codeigniter

    Try this https://github.com/rusuandreirobert/codeigniter-startup It uses HMVC. Basically HMVC gives you a structure rather the normal one in codeigniter. CI has controller/action . HMVC CI has module/controller/action . And in HMVC …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how to partion Hard disk on Ubuntu like windows

    Hi, You can use **Gparted** to create or resize the partitions, but you have to start linux from a liveCD or an USB so you can change the partition without …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Separating front-end and back-end using codeigniter

    Hi! Check the documentation: * http://ellislab.com/codeigniter/user-guide/general/managing_apps.html In particular: >**Note:** Each of your applications will need its own index.php file which calls the desired application. The index.php file can be named …

The End.