[TYPO3-dev] Web- address + returnUrl

Steffen Kamper steffen at dislabs.de
Sat Jan 13 23:23:40 CET 2007


"Tapio Markula" <tapio.markula at atwebteam.com> schrieb im Newsbeitrag 
news:mailman.1.1168726025.17014.typo3-dev at lists.netfielders.de...
> Steffen Kamper kirjoitti:
>> Hi Tapio,
>>
>> "Tapio Markula" <tapio.markula at atwebteam.com> schrieb im Newsbeitrag 
>> news:mailman.1.1168719432.16720.typo3-dev at lists.netfielders.de...
>>> Martin Kutschker kirjoitti:
>>>> Tapio Markula schrieb:
>>>>> Hi
>>>>>
>>>>> How to define returnUrl correctly
>>>>>
>>>>> I would make some specific returnUrl for page
>>>>> modules, which has some extra parameters
>>>>>
>>>>> $returnUrl='&returnUrl='.htmlspecialchars(t3lib_extMgm::siteRelPath('templavoila').'mod1/index.php?id='.$id.$thisUser.$languagePar);
>>>>
>>>> You should use rawurlencode() on the query parts instead of 
>>>> htmlspecialchars(). Use htmlspecialchars only one of the whole URL.
>>>>
>>>> Masi
>>> ok seems to work
>>> I put also
>>> $myGET=t3lib_div::_GET();
>>> ...
>>>
>>> also get param through that - ok? 
>>> $returnUrl='&returnUrl='.rawurlencode($myGET['returnUrl']);
>>
>> you can use it, also 
>> $returnUrl='&returnUrl='.rawurlencode(t3lib_div::_GP('returnUrl'));
>>
>>> BTW. I have still one problem. SQL-queries should in priciple work also 
>>> with other database as mysql
>>>
>>> I have currenlty used mysql_query and mysql_fetch_array for new queries
>>> but Stefan Galinky said that I should ask Typo3 database functions,
>>> which would make queries to work also with other database than just 
>>> mysql
>>> Can you give exact answer
>>> how to replace
>>> $pageMaxItem = mysql_query("SELECT MAX(uid) FROM 
>>> pages;",$GLOBALS['TYPO3_DB']->link);
>>> $pageMaxItem=mysql_fetch_array($pageMaxItem);
>>> with functions, which are not depending of mysql database.
>>>
>> no problem, use
>>
>> $res=$GLOBALS['TYPO3_DB']->exec_SELECTquery(
>>    'MAX(uid)',
>>    'pages',
>>    '', #where
>>    '', #group
>>    '', #order
>>    '' #limit
>> );
>>  $row=$GLOBALS['TYPO3_DB']->sql_fetch_row($res);
>>
>> vg  Steffen
>
> that seemst to work.
>
> endeed I'm not sure about the usage of
>
> variables
>  'uid',
>    'pages_language_overlay',
>    'pid='.$id, #where
>    '', #group
>    '', #order
>    '' #limit
>
>
>    'pid=".$id."', #where
>
> Could you please give as good advice (at good
> listed in lines from UPDATE and INSERT statements too.
>
> if several AND
>
>
> an example of existing update query
>
> $query = "UPDATE be_users set cookiedata='".$userCookiedata."' WHERE 
> username='".$userName."';";
>
>
> an example of update query
> $query = "INSERT INTO tt_content (pid,header,CType,colPos) VALUES 
> (".$pageMaxItem.",'".$header."','".$CType."','".$colPos."');";
>

look here, all documentated:
http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/current/view/1/4/

vg  Steffen 






More information about the TYPO3-dev mailing list