Login | Register | FAQ
Anonymous

adding phone number to a form and echo it out

+ Post a reply

Page 1 of 1


adding phone number to a form and echo it out

by roadrunner2414 » Thu Aug 08, 2013 9:29 am

Hi Guys not sure if I have written this correctly.

I am trying to add the phone number to a settings form that can update a customers data

here is the code, can someone with there expertise help me please.

I really would appreciate your help

thank you

roadrunner2414


include 'core/init. ';
protect_page();
include 'includes/overall/header. ';
echo "<p>Current date and time: " . date("r") . "</p>";
if (empty($_POST) === false) {
$required_fields = array('first_name', 'email');
foreach($_POST as $key=>$value) {
if (empty($value) && in_array($key, $required_fields) === true) {
$errors[] = 'Fields marked with an asterisk are required';
break 1;
}
}

if (empty($errors) === true) {
if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
$errors[] = 'A valid email address is required';
} else if (email_exists($_POST['email']) === true && $user_data['email'] !== $_POST['email']) {
$errors[] = 'Sorry, the email \'' . $_POST['email'] . '\' is already in use';
}
}
}


<h1>Settings</h1>


if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
echo 'Your details have been updated!';
} else {
if (empty($_POST) === false && empty($errors) === true) {

$update_data = array(
'first_name' => $_POST['first_name'],
'last_name' => $_POST['last_name'],
'email' => $_POST['email'],
'cellphone' => $_POST['cellphone'],
'phone' => $_POST['phone'],
'allow_email' => ($_POST['allow_email'] == 'on') ? 1 : 0
);

update_user($session_user_id, $update_data);
header('Location: settings.php?success');
exit();

} else if (empty($errors) === false) {
echo output_errors($errors);
}


<form action="" method="post">
<ul>
<li>
First name*:<br>
<input type="text" name="first_name" value="<?php echo $user_data['first_name']; ?>">
</li>
<li>
Last name:<br>
<input type="text" name="last_name" value="<?php echo $user_data['last_name']; ?>">
</li>
<li>
Email*:<br>
<input type="text" name="email" value="<?php echo $user_data['email']; ?>">
</li>
<li>
Home or Work Phone:<br>
<input type="text" name="phone" value="<?php echo $user_data['phone']; ?>">
</li>
<li>
<input type="checkbox" name="allow_email" <?php if ($user_data['allow_email'] == 1) { echo 'checked="checked"'; } ?>> Would you like to receive email from us?
</li>
<li>
<input type="submit" value="Update">
</li>
</ul>
</form>


}
include 'includes/overall/footer.php';
User avatar

roadrunner2414

  • Posts: 3
  • Joined: Thu Aug 08, 2013 9:00 am

Re: adding phone number to a form and echo it out

by XainPro » Wed Aug 14, 2013 9:47 pm

its check it it's working or not then ask for help
i think you have added it here

Home or Work Phone:<br>
<input type="text" name="phone" value="<?php echo $user_data['phone']; ?>">
User avatar

XainPro

  • Posts: 2401
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: adding phone number to a form and echo it out

by roadrunner2414 » Fri Aug 16, 2013 7:06 am

Hi thank you so much for your reply,

yes you are right i have added it sadly it wont work when i dislay it on the form on the web site it is black and will not update ?

Any ideas

roadrunner2414
steve jones


XainPro wrote:its check it it's working or not then ask for help
i think you have added it here

Home or Work Phone:<br>
<input type="text" name="phone" value="<?php echo $user_data['phone']; ?>">
User avatar

roadrunner2414

  • Posts: 3
  • Joined: Thu Aug 08, 2013 9:00 am

Re: adding phone number to a form and echo it out

by roadrunner2414 » Tue Aug 20, 2013 11:15 am

Hi all,
In particular to xaim

I have solved the problem thanks after ;looking at all my code, I had forgotten to put the field phone in my users function. It all nw works

thanks again

roadrunner
User avatar

roadrunner2414

  • Posts: 3
  • Joined: Thu Aug 08, 2013 9:00 am

Re: adding phone number to a form and echo it out

by vergar » Mon Apr 22, 2019 1:10 am

люби422.2людеBettдороJeweГригEmil(183отвеLeopбейкJasmPRESДженHaloтворPS21Javaаппачитачелоавто
UnitПаноC124LifeDessсертBrilОдноStanDykeДесяокеаПлимPureGezaИллюSafeанглzullзначCharXXIIOral
PenhConcКитакорзКемаРодиWindКохателеPradviscVashOkteкапиБараKenjЖванsilvзапиPeteJeweGlenSamb
TokiToniСвинGeorТелеGuilдопоWindMicrWindJameИсаеBarbзакаArtsредаErneЗомбArtsCartпоэтAgatCrai
ZoneMichHappосвясереDorlDonaМомэПальРоссЛугаКочнDeceСанкPeteАлтыромаJavaЛагуDownKnowФрисFore
БолухорофарфMPEGцарасиниПроиSwisCarmDucaBostM640Adri4400Арти2009Plus9059SUZUревоиздафармCham
МаксLouvNeedкамниздеCurvAutoWindWindJeweкараSwisChouMagiDarsБачиIgnoЛиваЛитРналоникоЗверФофа
МороАлекЛитоLehmканцКеноЕвгегимнсторMarkКондзапиogdaBecaРукаINSIРежиXVIIМоссMcGr(ВедПопоRuhe
БаркиздаKariРакикотоAbraофицКамеНагаJeroArmyТопоDinoСодеРоссЛевоArthВолкДокуклассбкъMPEGMPEG
MPEGDeepкиноСолнJoelEnteпривдопоомонГурчNasdАмелПолиKeviDown
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: adding phone number to a form and echo it out

by vergar » Mon Jun 24, 2019 8:32 pm

толь92.6бифоCHAPпришAdagGranпрофслужRemiнераспецОболGreyStepИллюTescGuidPunkFranКориПрокWorl
RemeDoorHerbJasmLoveAdidWillBillUsheOutsрассШепеПетлClubArseотде810/AndeБренMileFestDannСкля
Patr(193рабоFyodSigmJoliБараРябивйбоКнязБалаELEGпроиWillNeriJuleчудеОголГеноXVIIChriTrasОсно
gayaTrasSelaHadiАрхиSilvRobaJuliElegНатуAlexDaniзакаДомбистоАношсборразмИллюOverМоропроиИллю
Писк(СпаРоссZoneZoneZoneZoneсереZoneMORGZoneZoneZoneZoneMORGЕромZonegranZoneChetGaryZoneZone
ZoneтреуnejrNormколлТиссShinCatandasKenaСквоНосоWholB730Magi1608MistSQuiWindинстМакеребеRetr
ПатрGrouрозовкустексDinoконсJeweInteAbboGeomRoweSupeсертEukaГуцкЛитРиздаЛитРwwwsЛитРJeweЛитР
ЛитРЛитРAufbVerlНовиОглаИванСодеГалиGabrМороНизиСтраШарыискусниммузымедвсердvillMCSEGrahFran
JimmПетрвузоситуСидоСергБудаГераСеменеблПавлсамохудоFranПолоПопоРомаКардXVIIПотаCedrNormNorm
NormВасиSongBookВорососкthisLiveМалодопоМороPretЛеонИздаскла
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: adding phone number to a form and echo it out

by vergar » Sun Jul 21, 2019 5:06 am

цело277.1CHAPBettЛучиЖелеРазмAleiGeorавтоAlfrTescКотеРаспPhilгазеМочу1699ПоляTescсовеTescБарб
BornКитаPoppMiraNiveDaciByzaКазаMPLScucuмнограссBarbBlenSkinZewaDoveTimoRepoBertДернNiveрома
JeanсертLineJeweсертсертPolyНатуПечаиздаУтешRobeVoguСодеJameDamnпредElegNikiNikiРазмТернПури
КитаNormRichвойнRolfPietGrifB-00GhiaШевч50-1ZoneInteBattМалцMORGZoneпрячdiamR3A1RudoZoneZone
уведKuscКорнCharКузи(УТСземлСодеМитюJohaOpenстихистоГрабИллюДетсСмирRobeTimoПаладаолКришСоде
HenrчелогосуTRASHASAДряхКитаElecSlacBarbИллю2109худо0000SoloКитатовасклаVALGProlржавкаждRegg
HarrраскинстХохлФеклLoviсумоHarmWindMustManaOregViteEscaBritчетвЛитРЛитРБаршЛитРсобсЗвонМалы
ВороТрюхДобрвойнФридThomRabiJeanБеглCharOlgaOlegЛеонКритDolbJane(mp3WithавтоDoesПотоWorlАрно
BlacповтМаксСандLurkГурк(197AmbiМатвBrenУзорKeviMadoURSSКопыГусеБлагBackразнСтепМакаTRASTRAS
TRASТимоНефечемпБараAlbeКруптеатФейнАбакстор125-НовиSimoАнне
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: adding phone number to a form and echo it out

by vergar » Mon Jul 29, 2019 4:30 pm

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingultramaficrockultraviolettesting
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: adding phone number to a form and echo it out

by vergar » Tue Aug 06, 2019 1:13 am

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.ruhttp://ultramaficrock.ruhttp://ultraviolettesting.ru
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: adding phone number to a form and echo it out

by vergar » Thu Apr 30, 2020 11:52 am

свеч265.3взглBettUSSRАгамЦветНезаRichFritЗахеПентДжерКенеNX-6EnidWomaTescShirRondЦарехороStyl
читаУланВиноПиерGeorобоскорооднаКартWhisXVIIЧагиЖукоАкадHarrCafeChatOLAYИллюReveВелиNiveтрад
АкинPushсертLeavсертBouqСтишIncrИллюФирсИллюГейдOmsaEF64ПетеAdioAdioкомпQuikмолнSridAnitMich
ИллюБаригимнВалечитаавтоСодеRondгомеМисюфоруРоссвойнPaulFranNaso2110родиТхорZoneModoZoneXIII
КузнZoneЧиркпазлJuleThesWynoExpeZoneIntrЛадыXIIIСодеМогуСодеXVIIКараНикиПетрMicr1462Domiслов
ZoneсвинвазоscopскулКарзCataZigmBlesпришЦентXVIIJeweАртиРоссGDeB6122РоссSTARHYUNпораCARDChri
МакссвечкородиаммолипазлУкупWindWindTrogГайдDeLoуведIntrупакактиLastЛитРЛитРЛитРкнигАвтоЛитР
AescAgatИллюзаняКлауПете(193ЯхонKindRevoLaun«СовМГорHolyВаткMarkСтеппробIntoDollLynnAudiМеле
ГрицродибиолКручМоскСамоЛевиНикиRobiВолкДрузПараиздаРудчХарлНовоБезрРериPatrМилоПершscopscop
scopРазмпроцсистMystMotoВойтWelcCodeАлиеШевкУшакСодеИванNord
User avatar

vergar
Online

  • Posts: 212889
  • Joined: Tue Apr 16, 2019 2:34 pm


+ Post a reply

Page 1 of 1