Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1. Buchstabe umwandeln(upper) beim Kunden Formular


osullivan1533006711

Recommended Posts

Hallo,

möchte gerne bei der Kunden Neueingabe sowie beim Kundenseitigem editieren der Daten, dass automatisch der erste Buchstabe, in den Input-Feldern 'Vorname, Nachname, Straße und Ort', groß geschrieben / ersetzt wird, am besten bereits bei der jeweiligen Eingabe selbst.

Netzwerkkomponenten, Computer-Zubehör, Hard- und Software etc. von Adam Systems UG

Link to comment
Share on other sites

  • 3 weeks later...
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Danke dir ich hatte es bereits mit der Funktion  'ucfirst()' und 'ucwords()' vergebens versucht, 'lcfirst() macht ja generell eine Wandlung des ersten Buchstabens.
Ich möchte ja die Eventualität abdecken falls der user alles klein schreibt.

Vielleicht habe ich es in der falschen Zeile oder Script versucht. Ist schon wieder mal einige Tage her.

Netzwerkkomponenten, Computer-Zubehör, Hard- und Software etc. von Adam Systems UG

Link to comment
Share on other sites

da wo der Eintrag in die datenbank statt findet diese variable ist umzuwandelen.

Beispiel in aus der Datei create_account.php

$firstname = tep_db_prepare_input(ucfirst($_POST['firstname']));
$lastname = tep_db_prepare_input(ucfirst($_POST['lastname']));

aus john wird John
aus smith wird Smith

Auch mb_ucfirst ist eventuell zu verwenden

Edited by mcmannehan
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Hier mal mein Code den ich bei mir in der datei create_acount.php verwende:

$firstname = tep_db_prepare_input(ucwords($_POST['firstname']));
$lastname = tep_db_prepare_input(ucwords($_POST['lastname']));
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
$email_address = tep_db_prepare_input($_POST['email_address']);
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input(ucwords($_POST['company']));
$street_address = tep_db_prepare_input(ucwords($_POST['street_address']));
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input(ucwords($_POST['city']));
   

ucwords ist gut dafür

Also generell die POST Variable auf ucwords einstellen und zwar bevor der Eintrag in die Datenbank erfolgt.

Edited by mcmannehan
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Bei der Eingabe selbst, muss dies mit javascript gelöst werden. Würde ich aber nicht so machen, sondern immer bevor die Daten in die Datenbank geschrieben werden.

Bitte auch auf "Gefällt mir" bei meinen Antworten klicken, Danke!

Edited by mcmannehan
  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Danke schön!

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

  • 5 months later...
On 26.8.2017 at 11:59, mcmannehan said:

Hier mal mein Code den ich bei mir in der datei create_acount.php verwende:


$firstname = tep_db_prepare_input(ucwords($_POST['firstname']));
$lastname = tep_db_prepare_input(ucwords($_POST['lastname']));
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
$email_address = tep_db_prepare_input($_POST['email_address']);
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input(ucwords($_POST['company']));
$street_address = tep_db_prepare_input(ucwords($_POST['street_address']));
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
$postcode = tep_db_prepare_input($_POST['postcode']);
$city = tep_db_prepare_input(ucwords($_POST['city']));
   

ucwords ist gut dafür

Also generell die POST Variable auf ucwords einstellen und zwar bevor der Eintrag in die Datenbank erfolgt.

Der Manfred kann ja mal was sinnvolles beitragen. Wer hätte das gedacht. Ein Wunder ist geschehen. 

 

Danke mein Bester 

Link to comment
Share on other sites

×
×
  • Create New...