Forums

Space in subject line??

MistaT2000 04 Aug, 2008
Hi folks,

Here is my before submit code for my subject line:

<?php
$rows[0]->emailsubject = "Postcode: ".$_POST['Postcode']." TxName: ".$_POST['txname']." Fault: ".$_POST['field']."Contact ID: ".$_POST['contactid'];
?>


I want to know how I can get spaces in between the form data??

Any help would be much appreciated 🙂
Max_admin 04 Aug, 2008
Hi Mista,

what do you mean by "form data" ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MistaT2000 04 Aug, 2008
Hi admin,

The form data thats in my subject line, basically i want to know how i can put spaces in the above code so that the data in the subject line has spaces between it so that its easily readable...

eg: Subject: Postcode: G23 4LM (space) TxName: blah blah (space)

Sorry its a monday and my brain isnt working properly 😟 🤣
Max_admin 04 Aug, 2008
ah ok, but the above code you add doesn't show any spaces when you get it ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MistaT2000 04 Aug, 2008

ah ok, but the above code you add doesn't show any spaces when you get it ?



Nope 😟
Max_admin 04 Aug, 2008
try this :

    <?php
    $rows[0]->emailsubject = "this is a space     test!!  ???   ???";
    ?>


can you see those spaces in the subject when you get the email ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MistaT2000 04 Aug, 2008
I can see spaces when I type them in as text but I want the space how I have described above eg:

Subject: Postcode: [postcode form data] {space} TxName: [txname form data] {space}
Max_admin 04 Aug, 2008
I understand, try this :

<?php
$sub= "Postcode: ".$_POST['Postcode']." TxName: ".$_POST['txname']." Fault: ".$_POST['field']."Contact ID: ".$_POST['contactid'];
$rows[0]->emailsubject = $sub;
?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 04 Aug, 2008
Hi MistaT2000,

What happens if you use the   entity?

Bob
MistaT2000 05 Aug, 2008

I understand, try this :

<?php
$sub= "Postcode: ".$_POST['Postcode']." TxName: ".$_POST['txname']." Fault: ".$_POST['field']."Contact ID: ".$_POST['contactid'];
$rows[0]->emailsubject = $sub;
?>



Thats brilliant thanks! I just added a couple of spaces withing the value field for the fault as it didnt put a space in but its now perfect!

Thanks a million for your help! 😀
This topic is locked and no more replies can be posted.